removeReferencesTo: rewrite using replaceVarsWith

This commit is contained in:
Stefan Frijters
2026-01-28 18:52:21 +01:00
parent 31cb1cec00
commit 1357901208
2 changed files with 7 additions and 20 deletions

View File

@@ -5,34 +5,21 @@
{
lib,
stdenvNoCC,
replaceVarsWith,
signingUtils,
replaceVars,
stdenvNoCC,
shell ? stdenvNoCC.shell,
}:
let
remove-references-to = replaceVars ./remove-references-to.sh {
replaceVarsWith {
src = ./remove-references-to;
replacements = {
inherit (builtins) storeDir;
shell = lib.getBin shell + (shell.shellPath or "");
signingUtils = lib.optionalString (
stdenvNoCC.targetPlatform.isDarwin && stdenvNoCC.targetPlatform.isAarch64
) signingUtils;
};
in
stdenvNoCC.mkDerivation {
name = "remove-references-to";
strictDeps = true;
enableParallelBuilding = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
install -Dm755 ${remove-references-to} $out/bin/remove-references-to
'';
dir = "bin";
isExecutable = true;
meta.mainProgram = "remove-references-to";
}