Files
nixpkgs/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
1.4 KiB
Nix

{
lib,
apple-sdk,
bison,
clang,
libedit,
libresolv,
libsbuf,
libutil,
libxo,
pkg-config,
mkAppleDerivation,
}:
let
# nohup requires vproc_priv.h from launchd
launchd = apple-sdk.sourceRelease "launchd";
in
mkAppleDerivation {
releaseName = "shell_cmds";
outputs = [
"out"
"man"
];
xcodeHash = "sha256-26N7AZV/G+ryc2Nu1v91rEdb1a6jDpnj6t5rzEG2YA4=";
postPatch = ''
# Fix `mktemp` templates
substituteInPlace sh/mkbuiltins \
--replace-fail '-t ka' '-t ka.XXXXXX'
substituteInPlace sh/mktokens \
--replace-fail '-t ka' '-t ka.XXXXXX'
# Update `/etc/locate.rc` paths to point to the store.
for path in locate/locate/locate.updatedb.8 locate/locate/locate.rc locate/locate/updatedb.sh; do
substituteInPlace $path --replace-fail '/etc/locate.rc' "$out/etc/locate.rc"
done
'';
env.NIX_CFLAGS_COMPILE = "-I${launchd}/liblaunch";
depsBuildBuild = [ clang ];
nativeBuildInputs = [
bison
pkg-config
];
buildInputs = [
libedit
libresolv
libsbuf
libutil
libxo
];
postInstall = ''
# Patch the shebangs to use `sh` from shell_cmds.
HOST_PATH="$out/bin" patchShebangs --host "$out/bin" "$out/libexec"
'';
meta = {
description = "Darwin shell commands and the Almquist shell";
license = [
lib.licenses.bsd2
lib.licenses.bsd3
];
};
}