script-directory: fix cross patching

This commit is contained in:
Peder Bergebakken Sundt 2025-05-01 02:27:48 +02:00
parent 0056729cb5
commit 875bb58595

View file

@ -4,6 +4,7 @@
fetchFromGitHub,
installShellFiles,
patsh,
coreutils,
}:
stdenvNoCC.mkDerivation rec {
@ -22,10 +23,13 @@ stdenvNoCC.mkDerivation rec {
patsh
];
# needed for cross
buildInputs = [ coreutils ];
installPhase = ''
runHook preInstall
patsh -f sd
patsh -f sd -s ${builtins.storeDir} --path "$HOST_PATH"
install -Dt "$out/bin" sd
installShellCompletion --zsh _sd