diff options
author | Graham Christensen <graham@tumblr.com> | 2017-11-14 12:12:19 -0500 |
---|---|---|
committer | Graham Christensen <graham@tumblr.com> | 2017-11-14 19:07:30 -0500 |
commit | 753f7be38d1bc683a9330b6214f5731eebc656f0 (patch) | |
tree | f6fbc928656986901eab8cc07a884e2f19ddd8df /pkgs/tools/archivers/sharutils | |
parent | 20a5e9db841a5b04f7c3d39f775552b1a1025b46 (diff) |
sharutils: simplify substituteInPlace syntax to be Nix 1.11.8 compatible
Diffstat (limited to 'pkgs/tools/archivers/sharutils')
-rw-r--r-- | pkgs/tools/archivers/sharutils/default.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 11072fc28dea..9f161ac7525a 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -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; |