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
44 lines
880 B
Nix
44 lines
880 B
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
_7zz,
|
|
pname,
|
|
version,
|
|
hash,
|
|
isAarch64,
|
|
metaCommon ? { },
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/mifi/lossless-cut/releases/download/v${version}/LosslessCut-mac-${
|
|
if isAarch64 then "arm64" else "x64"
|
|
}.dmg";
|
|
inherit hash;
|
|
};
|
|
|
|
nativeBuildInputs = [ _7zz ];
|
|
|
|
sourceRoot = "LosslessCut.app";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p "$out/Applications"
|
|
cd ..
|
|
mv "$sourceRoot" "$out/Applications"
|
|
mkdir -p "$out/bin"
|
|
ln -s "$out/Applications/$(basename "$sourceRoot")/Contents/MacOS/LosslessCut" "$out/bin/losslesscut"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta =
|
|
metaCommon
|
|
// (with lib; {
|
|
platforms = if isAarch64 then [ "aarch64-darwin" ] else platforms.darwin;
|
|
mainProgram = "losslesscut";
|
|
});
|
|
}
|