diff options
author | Andrew Dunham <andrew@du.nham.ca> | 2019-01-06 00:53:21 -0500 |
---|---|---|
committer | Andrew Dunham <andrew@du.nham.ca> | 2019-01-06 06:45:55 -0500 |
commit | a5d41a30e5f0b36dcf204cc461a413d8cfb9366b (patch) | |
tree | 9860c73647e730c83a541a2a536787b04c1fbc32 | |
parent | 1bb4e5c8dc25c13a6c4b980a439c053810262007 (diff) | |
download | nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar.gz nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar.bz2 nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar.lz nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar.xz nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.tar.zst nixlib-a5d41a30e5f0b36dcf204cc461a413d8cfb9366b.zip |
gitAndTools.git-annex: wrap binary on not-Linux to use Nixpkgs' coreutils
-rw-r--r-- | pkgs/development/haskell-modules/configuration-nix.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f0d629ad5e44..d7292c66fb85 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -544,6 +544,19 @@ self: super: builtins.intersectAttrs super { ''; }); + # On Darwin, git-annex mis-detects options to `cp`, so we wrap the binary to + # ensure it uses Nixpkgs' coreutils. + git-annex = with pkgs; + if (!stdenv.isLinux) then + let path = stdenv.lib.makeBinPath [ coreutils ]; + in overrideCabal (addBuildTool super.git-annex makeWrapper) (_drv: { + postFixup = '' + wrapProgram $out/bin/git-annex \ + --prefix PATH : "${path}" + ''; + }) + else super.git-annex; + # The test suite has undeclared dependencies on git. githash = dontCheck super.githash; |