https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
10 lines
265 B
Nix
10 lines
265 B
Nix
{ appleDerivation, xcbuildHook, IOKit }:
|
|
|
|
appleDerivation {
|
|
nativeBuildInputs = [ xcbuildHook ];
|
|
buildInputs = [ IOKit ];
|
|
xcbuildFlags = [ "-target" "caffeinate" ];
|
|
installPhase = ''
|
|
install -D Products/Deployment/caffeinate $out/bin/caffeinate
|
|
'';
|
|
}
|