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