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
54 lines
888 B
Nix
54 lines
888 B
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
undmg,
|
|
...
|
|
}:
|
|
|
|
{
|
|
meta,
|
|
pname,
|
|
product,
|
|
productShort ? product,
|
|
src,
|
|
version,
|
|
plugins ? [ ],
|
|
buildNumber,
|
|
...
|
|
}@args:
|
|
|
|
let
|
|
loname = lib.toLower productShort;
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
inherit
|
|
pname
|
|
src
|
|
version
|
|
plugins
|
|
;
|
|
passthru.buildNumber = buildNumber;
|
|
passthru.product = product;
|
|
passthru.tests = args.passthru.tests;
|
|
meta = meta // {
|
|
mainProgram = loname;
|
|
};
|
|
desktopName = product;
|
|
dontFixup = true;
|
|
installPhase = ''
|
|
runHook preInstall
|
|
APP_DIR="$out/Applications/${product}.app"
|
|
mkdir -p "$APP_DIR"
|
|
cp -Tr *.app "$APP_DIR"
|
|
mkdir -p "$out/bin"
|
|
cat << EOF > "$out/bin/${loname}"
|
|
#!${stdenvNoCC.shell}
|
|
open -na '$APP_DIR' --args "\$@"
|
|
EOF
|
|
chmod +x "$out/bin/${loname}"
|
|
runHook postInstall
|
|
'';
|
|
nativeBuildInputs = [ undmg ];
|
|
sourceRoot = ".";
|
|
}
|