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

yazi-unwrapped: fix update script; use finalAttrs #385409

Merged
merged 2 commits into from
Mar 2, 2025

Conversation

eljamm
Copy link
Contributor

@eljamm eljamm commented Feb 26, 2025

The update script silently broke because of the changes to srcs and also because nix-prefetch is very outdated.

Got the code to update the cargoHash from the scx update script.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@eljamm eljamm mentioned this pull request Feb 26, 2025
13 tasks
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Feb 26, 2025
@eljamm eljamm force-pushed the yazi-fix-update-script branch 2 times, most recently from 8babe85 to 986124c Compare February 26, 2025 23:52
@uncenter
Copy link
Member

Looks good to me! Produced the following diff when run with nix run nixpkgs#nix-update -- yazi-unwrapped -u (successfully!):

diff --git i/pkgs/by-name/ya/yazi-unwrapped/package.nix w/pkgs/by-name/ya/yazi-unwrapped/package.nix
index 91812c39dd6d..14d97d43dc30 100644
--- i/pkgs/by-name/ya/yazi-unwrapped/package.nix
+++ w/pkgs/by-name/ya/yazi-unwrapped/package.nix
@@ -9,13 +9,13 @@
   rust-jemalloc-sys,
 }:
 let
-  version = "25.2.11";
+  version = "25.2.26";
 
   code_src = fetchFromGitHub {
     owner = "sxyazi";
     repo = "yazi";
     tag = "v${version}";
-    hash = "sha256-yVpSoEmEA+/XF/jlJqKdkj86m8IZLAbrxDxz5ZnmP78=";
+    hash = "sha256-DqhqpQRCSBTGonL9+bP7pA3mO2CemlbhwzShVdrL1/0=";
   };
 
   man_src = fetchFromGitHub {
@@ -38,11 +38,11 @@ rustPlatform.buildRustPackage {
   sourceRoot = code_src.name;
 
   useFetchCargoVendor = true;
-  cargoHash = "sha256-AfXi68PNrYj6V6CYIPZT0t2l5KYTYrIzJgrcEPLW8FM=";
+  cargoHash = "sha256-xg37aypFKY0ZG9GOkygTHlOAjqkTuhLNKo8Fz6MF2ZY=";
 
   env.YAZI_GEN_COMPLETIONS = true;
   env.VERGEN_GIT_SHA = "Nixpkgs";
-  env.VERGEN_BUILD_DATE = "2025-02-11";
+  env.VERGEN_BUILD_DATE = "2025-02-26";
 
   nativeBuildInputs = [ installShellFiles ];
   buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];

nix-build -A yazi-unwrapped completed successfully and produced working binaries.

@uncenter uncenter added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Feb 27, 2025
@eljamm eljamm force-pushed the yazi-fix-update-script branch from 986124c to e0a4353 Compare February 27, 2025 21:18
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Feb 27, 2025
This should be better for overriding sources
@eljamm eljamm force-pushed the yazi-fix-update-script branch from e0a4353 to a773507 Compare February 27, 2025 21:23
@eljamm eljamm removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Feb 27, 2025
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Feb 27, 2025
@eljamm eljamm added 12.approvals: 1 This PR was reviewed and approved by one reputable person and removed 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Feb 27, 2025
@uncenter
Copy link
Member

Since this is now much larger than an update script fix can we update the commit message and pull request title?

@eljamm eljamm changed the title yazi-unwrapped: fix update script yazi-unwrapped: fix update script; use finalAttrs Feb 27, 2025
@eljamm
Copy link
Contributor Author

eljamm commented Feb 27, 2025

Since this is now much larger than an update script fix can we update the commit message and pull request title?

I agree on the PR title, but the commits already describe what they do, so I don't think there is much to change there.

@uncenter
Copy link
Member

Since this is now much larger than an update script fix can we update the commit message and pull request title?

I agree on the PR title, but the commits already describe what they do, so I don't think there is much to change there.

Oops right I didn't notice you split the commits up already. My bad.


Can again confirm that the update script correctly updates the package in all the right places and the updated package then builds as expected with that latest changes.

@uncenter uncenter added 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Feb 27, 2025
@khaneliman khaneliman merged commit 228ff38 into NixOS:master Mar 2, 2025
38 checks passed
@eljamm eljamm deleted the yazi-fix-update-script branch March 2, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants