Merge pull request #31676 from grahamc/sharutils

sharutils: simplify substituteInPlace syntax to be Nix 1.11.8 compatible
This commit is contained in:
Daniel Peebles 2017-11-14 19:38:24 -05:00 committed by GitHub
commit 267be2ba62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,9 +18,16 @@ stdenv.mkDerivation rec {
# that cause shar to just segfault. It isn't a problem on Linux because their sandbox # that cause shar to just segfault. It isn't a problem on Linux because their sandbox
# remaps /etc/passwd to a trivial file, but we can't do that on Darwin so I do this # remaps /etc/passwd to a trivial file, but we can't do that on Darwin so I do this
# instead. In this case, I pass in the very imaginative "submitter" as the submitter name # instead. In this case, I pass in the very imaginative "submitter" as the submitter name
patchPhase = ''
substituteInPlace tests/shar-1 --replace '$''\{SHAR}' '$''\{SHAR} -s submitter' patchPhase = let
substituteInPlace tests/shar-2 --replace '$''\{SHAR}' '$''\{SHAR} -s submitter' # This evaluates to a string containing:
#
# substituteInPlace tests/shar-2 --replace '${SHAR}' '${SHAR} -s submitter'
# substituteInPlace tests/shar-2 --replace '${SHAR}' '${SHAR} -s submitter'
shar_sub = "\${SHAR}";
in ''
substituteInPlace tests/shar-1 --replace '${shar_sub}' '${shar_sub} -s submitter'
substituteInPlace tests/shar-2 --replace '${shar_sub}' '${shar_sub} -s submitter'
''; '';
doCheck = true; doCheck = true;