diff --git a/pkgs/development/libraries/physics/hepmc3/default.nix b/pkgs/development/libraries/physics/hepmc3/default.nix index f7f281af74f3..5294f18661e3 100644 --- a/pkgs/development/libraries/physics/hepmc3/default.nix +++ b/pkgs/development/libraries/physics/hepmc3/default.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation rec { postInstall = '' substituteInPlace "$out"/bin/HepMC3-config \ - --replace 'greadlink' '${coreutils}/bin/readlink' \ - --replace 'readlink' '${coreutils}/bin/readlink' + --replace-fail '$(greadlink' '$(${coreutils}/bin/readlink' \ + --replace-fail '$(readlink' '$(${coreutils}/bin/readlink' ''; pythonImportsCheck = [ "pyHepMC3" ];