Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mtk_uartboot: init at 0.1.1 #333260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatthewCroughan
Copy link
Contributor

Description of changes

Adds https://github.com/981213/mtk_uartboot to nixpkgs

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

pkgs/by-name/mt/mtk_uartboot/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/mt/mtk_uartboot/package.nix Show resolved Hide resolved
pkgs/by-name/mt/mtk_uartboot/package.nix Show resolved Hide resolved
pkgs/by-name/mt/mtk_uartboot/package.nix Outdated Show resolved Hide resolved
@Sigmanificient
Copy link
Member

Can you reformat the file with nixfmt-rfc-style? Thanks

PS: great talks on yt :D

@MatthewCroughan
Copy link
Contributor Author

@Sigmanificient Maybe you can merge it and then do that? In my view, if things like this are going to be requested from contributors, it should be an automatic treewide commit, the same as other mass-changes. I have not really been bothered by code style comments in PRs before, did something happen to ratify this and make it mandatory in PRs?

@Sigmanificient
Copy link
Member

I don't have the rights to merge / edits sadly, I mean still at the very beginning of my nixpkgs journey 😅

It's been ~2 weeks nixfmt-rfc-style has become mandatory, see Enforcing Nix formatting in Nixpkgs, which is part of the RFC 166. I believe it is done this way so nixpkgs gets progressively more and more formatted, rather than having milion of lines changed in a treewide pr? Not sure

@MatthewCroughan
Copy link
Contributor Author

Ouch, I hate it.

diff --git a/pkgs/by-name/mt/mtk_uartboot/package.nix b/pkgs/by-name/mt/mtk_uartboot/package.nix
index a9c0233c9556..34549bb688fa 100644
--- a/pkgs/by-name/mt/mtk_uartboot/package.nix
+++ b/pkgs/by-name/mt/mtk_uartboot/package.nix
@@ -1,8 +1,9 @@
-{ lib
-, rustPlatform
-, fetchFromGitHub
-, stdenv
-, darwin
+{
+  lib,
+  rustPlatform,
+  fetchFromGitHub,
+  stdenv,
+  darwin,
 }:

Now I can't use visual mode in vim to modify or remove multiple lines of ,.

I dislike this change, oh well.

Co-authored-by: Yohann Boniface <[email protected]>
@Sigmanificient
Copy link
Member

I'm sorry to hear that, may you leave your feedback in Satisfaction survey from the new RFC 166 formatting?


cargoHash = "sha256-At+HkvHcn6kAkSxBqFlaxUTZ7Xuy2lARMFQ2i6uybSk=";

buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];

buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];

meta = with lib; {
description = "third-party tool to load and execute binaries over UART for Mediatek SoCs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "third-party tool to load and execute binaries over UART for Mediatek SoCs";
description = "Third-party tool to load and execute binaries over UART for Mediatek SoCs";

src = fetchFromGitHub {
owner = "981213";
repo = "mtk_uartboot";
rev = "refs/v${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rev = "refs/v${version}";
rev = "refs/tags/v${version}";

cargoHash = "sha256-At+HkvHcn6kAkSxBqFlaxUTZ7Xuy2lARMFQ2i6uybSk=";

buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
doCheck = false; # no tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants