depot/third_party/nixpkgs/pkgs/applications/video/losslesscut-bin/dmg.nix
Default email aa526eb20f Project import generated by Copybara.
GitOrigin-RevId: fcd48a5a0693f016a5c370460d0c2a8243b882dc
2022-03-10 11:12:11 -08:00

31 lines
710 B
Nix

{ stdenvNoCC, lib, fetchurl, undmg, version , sha256 }:
let
pname = "losslesscut";
nameRepo = "lossless-cut";
nameCamel = "LosslessCut";
nameSource = "${nameCamel}-mac.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;
}