Merge pull request #31676 from grahamc/sharutils
sharutils: simplify substituteInPlace syntax to be Nix 1.11.8 compatible
This commit is contained in:
commit
267be2ba62
1 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue