push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# The program `nuke-refs' created by this derivation replaces all
# references to the Nix store in the specified files by a non-existent
# path (/nix/store/eeee...). This is useful for getting rid of
# dependencies that you know are not actually needed at runtime.
{
lib,
stdenvNoCC,
perl,
signingUtils,
shell ? stdenvNoCC.shell,
}:
stdenvNoCC.mkDerivation {
name = "nuke-references";
strictDeps = true;
enableParallelBuilding = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
substituteAll ${./nuke-refs.sh} $out/bin/nuke-refs
chmod a+x $out/bin/nuke-refs
'';
# FIXME: get rid of perl dependency.
env = {
inherit perl;
inherit (builtins) storeDir;
shell = lib.getBin shell + (shell.shellPath or "");
signingUtils = lib.optionalString (
stdenvNoCC.targetPlatform.isDarwin && stdenvNoCC.targetPlatform.isAarch64
) signingUtils;
};
meta.mainProgram = "nuke-refs";
}

View File

@@ -0,0 +1,32 @@
#! @shell@
fixupHooks=()
if [[ -n "@signingUtils@" ]]; then
source "@signingUtils@"
fi
excludes=""
while getopts e: o; do
case "$o" in
e) storeId=$(echo "$OPTARG" | @perl@/bin/perl -ne "print \"\$1\" if m|^\Q@storeDir@\E/([a-z0-9]{32})-.*|")
if [ -z "$storeId" ]; then
echo "-e argument must be a Nix store path"
exit 1
fi
excludes="$excludes(?!$storeId)"
;;
esac
done
shift $(($OPTIND-1))
for i in "$@"; do
if test ! -L "$i" -a -f "$i"; then
cat "$i" | @perl@/bin/perl -pe "s|\Q@storeDir@\E/$excludes[a-z0-9]{32}-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "$i.tmp"
if test -x "$i"; then chmod +x "$i.tmp"; fi
mv "$i.tmp" "$i"
if [[ -n "@signingUtils@" ]]; then
signIfRequired "$i"
fi
fi
done