diff options
author | Florian Klink <flokli@flokli.de> | 2024-01-14T17·18+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-01-15T23·14+0000 |
commit | c8114810c9f42410e837573e836c32510eb60ba7 (patch) | |
tree | 0aaca90369cf3938ee48bf7970cc2d9479e4c6d0 | |
parent | f0a750bcb7e3145974f99383a5db905b9e0d72a3 (diff) |
chore(third_party/overlays): bump crate2nix to 0.13.0 r/7388
We need to vendor in the package expression, as it's not possible to override cargoHash. Change-Id: Ib123647bb9b96d41f4630daa431d020f1cb8d4fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10624 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
-rw-r--r-- | third_party/overlays/tvl.nix | 40 | ||||
-rw-r--r-- | tvix/Cargo.nix | 3 |
2 files changed, 34 insertions, 9 deletions
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix index 8149337f44a6..876fcf3fa82f 100644 --- a/third_party/overlays/tvl.nix +++ b/third_party/overlays/tvl.nix @@ -74,13 +74,39 @@ depot.nix.readTree.drvTargets { }; })); - crate2nix = (super.crate2nix.override (_: { nix = self.nix_latest; })).overrideAttrs (old: rec { - patches = old.patches ++ [ - # run tests in debug mode, not release mode - # https://github.com/nix-community/crate2nix/pull/301 - ./patches/crate2nix-tests-debug.patch - ]; - }); + crate2nix = super.rustPlatform.buildRustPackage rec { + pname = "crate2nix"; + version = "0.13.0"; + + src = super.fetchFromGitHub { + owner = "nix-community"; + repo = "crate2nix"; + rev = "ceb06eb7e76afb9e01a5f069aae136f97df72730"; + hash = "sha256-JTMe8GViCQt51WUiaaoIPmWtwEeeYrl6pBxo2DNuKig="; + }; + + sourceRoot = "${src.name}/crate2nix"; + + cargoHash = "sha256-dhlSXY1CJE+JJt+6Y7W1MVMz36nwr6ny543py1TcjyY="; + + nativeBuildInputs = [ super.makeWrapper ]; + + # Tests use nix(1), which tries (and fails) to set up /nix/var inside the + # sandbox + doCheck = false; + + postFixup = '' + wrapProgram $out/bin/crate2nix \ + --suffix PATH ":" ${lib.makeBinPath (with self; [ cargo nix_latest nix-prefetch-git ])} + + rm -rf $out/lib $out/bin/crate2nix.d + mkdir -p \ + $out/share/bash-completion/completions \ + $out/share/zsh/vendor-completions + $out/bin/crate2nix completions -s 'bash' -o $out/share/bash-completion/completions + $out/bin/crate2nix completions -s 'zsh' -o $out/share/zsh/vendor-completions + ''; + }; evans = super.evans.overrideAttrs (old: { patches = old.patches or [ ] ++ [ diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index e3f4be07e3c7..d6400eed3db2 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -1,4 +1,4 @@ -# This file was @generated by crate2nix 0.12.0 with the command: +# This file was @generated by crate2nix 0.13.0 with the command: # "generate" "--all-features" # See https://github.com/kolloch/crate2nix for more info. @@ -13517,7 +13517,6 @@ rec { ( _: { buildTests = true; - release = false; } ); # If the user hasn't set any pre/post commands, we don't want to |