Merge pull request #181966 from Atemu/git-annex-lsof

git-annex: wrap with lsof
This commit is contained in:
maralorn 2022-07-19 00:36:03 +02:00 committed by GitHub
commit ee6f075310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -535,9 +535,7 @@ self: super: builtins.intersectAttrs super {
}) })
(addBuildTools (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx]) super.futhark); (addBuildTools (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx]) super.futhark);
git-annex = let git-annex = overrideCabal (drv: {
pathForDarwin = pkgs.lib.makeBinPath [ pkgs.coreutils ];
in overrideCabal (drv: pkgs.lib.optionalAttrs (!pkgs.stdenv.isLinux) {
# This is an instance of https://github.com/NixOS/nix/pull/1085 # This is an instance of https://github.com/NixOS/nix/pull/1085
# Fails with: # Fails with:
# gpg: can't connect to the agent: File name too long # gpg: can't connect to the agent: File name too long
@ -545,11 +543,12 @@ self: super: builtins.intersectAttrs super {
substituteInPlace Test.hs \ substituteInPlace Test.hs \
--replace ', testCase "crypto" test_crypto' "" --replace ', testCase "crypto" test_crypto' ""
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
# On Darwin, git-annex mis-detects options to `cp`, so we wrap the # Ensure git-annex uses the exact same coreutils it saw at build-time.
# binary to ensure it uses Nixpkgs' coreutils. # This is especially important on Darwin but also in Linux environments
# where non-GNU coreutils are used by default.
postFixup = '' postFixup = ''
wrapProgram $out/bin/git-annex \ wrapProgram $out/bin/git-annex \
--prefix PATH : "${pathForDarwin}" --prefix PATH : "${pkgs.lib.makeBinPath (with pkgs; [ coreutils lsof ])}"
'' + (drv.postFixup or ""); '' + (drv.postFixup or "");
buildTools = [ buildTools = [
pkgs.buildPackages.makeWrapper pkgs.buildPackages.makeWrapper