nukeReferences: rewrite using replaceVarsWith

This commit is contained in:
Stefan Frijters
2026-01-28 18:59:14 +01:00
parent 011ac8ec95
commit 31cb1cec00
2 changed files with 7 additions and 19 deletions
+7 -19
View File
@@ -5,14 +5,15 @@
{
lib,
stdenvNoCC,
replaceVarsWith,
perl,
signingUtils,
replaceVars,
stdenvNoCC,
shell ? stdenvNoCC.shell,
}:
let
nuke-refs = replaceVars ./nuke-refs.sh {
replaceVarsWith {
src = ./nuke-refs;
replacements = {
inherit perl; # FIXME: get rid of perl dependency.
inherit (builtins) storeDir;
shell = lib.getBin shell + (shell.shellPath or "");
@@ -20,20 +21,7 @@ let
stdenvNoCC.targetPlatform.isDarwin && stdenvNoCC.targetPlatform.isAarch64
) signingUtils;
};
in
stdenvNoCC.mkDerivation {
name = "nuke-references";
strictDeps = true;
enableParallelBuilding = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
install -Dm755 ${nuke-refs} $out/bin/nuke-refs
'';
dir = "bin";
isExecutable = true;
meta.mainProgram = "nuke-refs";
}