c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
31 lines
714 B
Nix
31 lines
714 B
Nix
{ stdenvNoCC, lib, fetchurl, undmg, version , sha256 }:
|
|
|
|
let
|
|
pname = "losslesscut";
|
|
nameRepo = "lossless-cut";
|
|
nameCamel = "LosslessCut";
|
|
nameSource = "${nameCamel}-mac-x64.dmg";
|
|
nameApp = nameCamel + ".app";
|
|
owner = "mifi";
|
|
src = fetchurl {
|
|
url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}";
|
|
name = nameSource;
|
|
inherit sha256;
|
|
};
|
|
in stdenvNoCC.mkDerivation {
|
|
inherit pname version src;
|
|
|
|
nativeBuildInputs = [ undmg ];
|
|
|
|
unpackPhase = ''
|
|
undmg ${src}
|
|
'';
|
|
sourceRoot = nameApp;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/Applications/${nameApp}
|
|
cp -R . $out/Applications/${nameApp}
|
|
'';
|
|
|
|
meta.platforms = lib.platforms.darwin;
|
|
}
|