diff --git a/flake.nix b/flake.nix index 5e4b05065..6294c2352 100644 --- a/flake.nix +++ b/flake.nix @@ -356,21 +356,13 @@ ./tools/nixpkgs_link_libunwind_and_libcxx.diff ]; }; - rust-overlay-patched = (import self.inputs.nixpkgs {inherit system;}).applyPatches { - name = "rust-overlay-patched"; - src = self.inputs.rust-overlay; - patches = [ - # This dependency has a giant dependency chain and we don't need - # it for our usecases. - ./tools/rust-overlay_cut_libsecret.diff - ]; - }; in import nixpkgs-patched { inherit system; overlays = [ (import ./tools/nixpkgs-disable-ratehammering-pulumi-tests.nix) - (import rust-overlay-patched) + (import rust-overlay) + (import ./tools/rust-overlay-cut-libsecret.nix) ]; }; apps = { diff --git a/tools/rust-overlay-cut-libsecret.nix b/tools/rust-overlay-cut-libsecret.nix new file mode 100644 index 000000000..65005546a --- /dev/null +++ b/tools/rust-overlay-cut-libsecret.nix @@ -0,0 +1,15 @@ +final: _prev: { + rust-overlay = + final.rust-overlay + // { + mkComponent = args @ {lib, ...}: + (final.rust-overlay.mkComponent args) + // { + postFixup = + lib.replaceStrings + ["patchelf --add-needed ${args.pkgsHostHost.libsecret}/lib/libsecret-1.so.0 $out/bin/cargo"] + ["# patchelf --add-needed ${args.pkgsHostHost.libsecret}/lib/libsecret-1.so.0 $out/bin/cargo"] + ((final.rust-overlay.mkComponent args).postFixup or ""); + }; + }; +} diff --git a/tools/rust-overlay_cut_libsecret.diff b/tools/rust-overlay_cut_libsecret.diff deleted file mode 100644 index 5d33be10c..000000000 --- a/tools/rust-overlay_cut_libsecret.diff +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/lib/mk-component-set.nix b/lib/mk-component-set.nix -index 90bd180..a8facde 100644 ---- a/lib/mk-component-set.nix -+++ b/lib/mk-component-set.nix -@@ -153,10 +153,10 @@ let - wrap "$dst" ${path + "/pkgs/build-support/bintools-wrapper/ld-wrapper.sh"} "$unwrapped" - done - fi -- '' -- + optionalString (stdenv.isLinux && pname == "cargo") '' -- patchelf --add-needed ${pkgsHostHost.libsecret}/lib/libsecret-1.so.0 $out/bin/cargo - ''; -+ # + optionalString (stdenv.isLinux && pname == "cargo") '' -+ # patchelf --add-needed ${pkgsHostHost.libsecret}/lib/libsecret-1.so.0 $out/bin/cargo -+ # ''; - - env = lib.optionalAttrs (pname == "rustc") ({ - inherit (stdenv.cc.bintools) expandResponseParams shell suffixSalt wrapperName coreutils_bin;