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

trunk-ng: 0.17.11 -> 0.17.16 #276488

Merged
merged 2 commits into from
Jun 1, 2024
Merged

Conversation

r-ryantm
Copy link
Contributor

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/ctron/trunk/releases.

meta.description for trunk-ng is: Build, bundle & ship your Rust WASM application to the web

meta.homepage for trunk-ng is: https://github.com/ctron/trunk

Updates performed
  • Rust version update
To inspect upstream changes
Impact

Checks done


  • built on NixOS
  • The tests defined in passthru.tests, if any, passed
  • found 0.17.16 with grep in /nix/store/3y2vldfyzpy1rfagsb0p5zvpbcp05bdm-trunk-ng-0.17.16
  • found 0.17.16 in filename of file in /nix/store/3y2vldfyzpy1rfagsb0p5zvpbcp05bdm-trunk-ng-0.17.16

Rebuild report (if merged into master) (click to expand)
1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
trunk-ng
Instructions to test this update (click to expand)

Either download from Cachix:

nix-store -r /nix/store/3y2vldfyzpy1rfagsb0p5zvpbcp05bdm-trunk-ng-0.17.16 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.

Or, build yourself:

nix-build -A trunk-ng https://github.com/r-ryantm/nixpkgs/archive/e0b94c5e7919a0734984377c14ad370fbad65340.tar.gz

Or:

nix build github:r-ryantm/nixpkgs/e0b94c5e7919a0734984377c14ad370fbad65340#trunk-ng

After you've downloaded or built it, look at the files and if there are any, run the binaries:

ls -la /nix/store/3y2vldfyzpy1rfagsb0p5zvpbcp05bdm-trunk-ng-0.17.16
ls -la /nix/store/3y2vldfyzpy1rfagsb0p5zvpbcp05bdm-trunk-ng-0.17.16/bin


Pre-merge build results

We have automatically built all packages that will get rebuilt due to
this change.

This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.

Result of nixpkgs-review run on x86_64-linux 1

1 package built:
  • trunk-ng

Maintainer pings

cc @ctron for testing.

@afh
Copy link
Member

afh commented Feb 12, 2024

Result of nixpkgs-review pr 276488 run on aarch64-darwin 1

1 package failed to build:
  • trunk-ng

Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

This package does not build on Darwin due to ld: framework not found SystemConfiguration

This patch fixes the build on Darwin:

diff --git a/pkgs/by-name/tr/trunk-ng/package.nix b/pkgs/by-name/tr/trunk-ng/package.nix
index 6ef55446de55..9c9f1594e45a 100644
--- a/pkgs/by-name/tr/trunk-ng/package.nix
+++ b/pkgs/by-name/tr/trunk-ng/package.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config
-, openssl, libiconv, CoreServices, Security }:
+, openssl, libiconv, CoreServices, Security, SystemConfiguration }:
 
 rustPlatform.buildRustPackage rec {
   pname = "trunk-ng";
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = if stdenv.isDarwin
-    then [ libiconv CoreServices Security ]
+    then [ libiconv CoreServices Security SystemConfiguration ]
     else [ openssl ];
 
   # requires network
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 030d9a21d55f..8102491b463c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14026,7 +14026,7 @@ with pkgs;
   trunk-io = callPackage ../development/tools/trunk-io { };
 
   trunk-ng = callPackage ../by-name/tr/trunk-ng/package.nix {
-    inherit (darwin.apple_sdk.frameworks) CoreServices Security;
+    inherit (darwin.apple_sdk.frameworks) CoreServices Security SystemConfiguration;
   };
 
   tthsum = callPackage ../applications/misc/tthsum { };

@wegank, what is a good way to amend this PRs changes from the @r-ryantm bot account with the patch above?

@wegank
Copy link
Member

wegank commented Feb 12, 2024

What about this: b3baac4?

@afh
Copy link
Member

afh commented Feb 12, 2024

Result of nixpkgs-review pr 276488 run on aarch64-darwin 1

1 package built:
  • trunk-ng

@afh
Copy link
Member

afh commented Feb 12, 2024

Works for me, thanks @wegank!

Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

I'm not too knowledgable about Nixpkgs and the direction that it should evolve to. That said my understanding for packages residing under pkgs/by-name was to avoid the need for edits in pkgs/top-level/all-packages.

I like the approach the meson package has taken as it declares dependancies near the top of the file while not needing an entry in all-packages.nix.

Do people see value in making a similar change to trunk-ng in the scope of this PR?

@wegank
Copy link
Member

wegank commented Feb 12, 2024

This is of course possible. However, a greater concern of this PR is that it does not build on ofborg due to hash mismatch on darwin, which is a regression. I suspect there's a case-sensitivity issue, but I haven't looked into it yet.

@afh
Copy link
Member

afh commented Feb 12, 2024

That's odd. The hash starting with sha256-AivISmT looks familiar to me and I might've come across it while building trunk-ng locally on my machine.
Curious about what you find in regards to the ofborg failure.

r-ryantm and others added 2 commits May 19, 2024 23:04
Co-authored-by: Alexis Hildebrandt <afh@surryhill.net>
@wegank wegank marked this pull request as ready for review May 19, 2024 21:35
@wegank wegank merged commit 7cc8e60 into NixOS:master Jun 1, 2024
24 checks passed
@afh
Copy link
Member

afh commented Jun 1, 2024

@wegank when building trunk-ng locally from master on aarch64-darwin I now get a hash mismatch, the hash I get is the same as the linux one. What could be going (wr)on(g) here?
What could be the reasons for the cargoHash to differ on the platforms?

error: hash mismatch in fixed-output derivation '/nix/store/9z7gdhxxi1zhih0mz924sakwacqzkfk0-trunk-ng-0.17.16-vendor.tar.gz.drv':
         specified: sha256-TwpGw3LH3TmZSbC4DkoOYpQdOpksXXoAoiacyZAefTU=
            got:    sha256-AivISmT/r8xa/vSXUN8sU7z67t1hcyMQM+t6oXmIOhU=

@wegank
Copy link
Member

wegank commented Jun 1, 2024

That's not the case on my side, though. I suppose you're having a case-insensitive store?

@afh
Copy link
Member

afh commented Jun 1, 2024

It seems that the nix-installer set up /nix on my machine that way even though my system is installed on case-sensitive APFS.

@wegank
Copy link
Member

wegank commented Jun 1, 2024

Oh, then probably /tmp, where the build takes place, is case-sensitive...

@afh
Copy link
Member

afh commented Jun 1, 2024

Nope /tmp is definitely case-sensitive…

% (cd /tmp; touch foo Foo; ls ?oo)
Foo foo

@r-ryantm r-ryantm deleted the auto-update/trunk-ng branch June 2, 2024 00:22
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