1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

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,10 +18,17 @@ stdenv.mkDerivation rec {
# 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
# 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'
substituteInPlace tests/shar-2 --replace '$''\{SHAR}' '$''\{SHAR} -s submitter'
'';
patchPhase = let
# 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;