losslesscut-bin: 3.46.2 -> 3.48.2 and add aarch64-darwin support

This commit is contained in:
Shamrock Lee 2022-12-05 05:15:53 +08:00
parent bd2a5f009a
commit f7860c59a3
2 changed files with 17 additions and 8 deletions

View File

@ -5,13 +5,14 @@
, pname
, version
, hash
, isAarch64
, metaCommon ? { }
}:
let
pname = "losslesscut";
src = fetchurl {
url = "https://github.com/mifi/lossless-cut/releases/download/v${version}/LosslessCut-mac-x64.dmg";
url = "https://github.com/mifi/lossless-cut/releases/download/v${version}/LosslessCut-mac-${if isAarch64 then "arm64" else "x64"}.dmg";
inherit hash;
};
in
@ -30,7 +31,7 @@ stdenvNoCC.mkDerivation {
'';
meta = metaCommon // (with lib; {
platforms = platforms.darwin;
platforms = singleton (if isAarch64 then "aarch64-darwin" else "x86_64-darwin");
mainProgram = "losslesscut";
});
}

View File

@ -6,7 +6,7 @@
let
pname = "losslesscut";
version = "3.46.2";
version = "3.48.2";
metaCommon = with lib; {
description = "The swiss army knife of lossless video/audio editing";
homepage = "https://mifi.no/losslesscut/";
@ -15,31 +15,39 @@ let
};
x86_64-appimage = callPackage ./build-from-appimage.nix {
inherit pname version metaCommon;
hash = "sha256-p+HscYsChR90JHdYjurY4OOHgveGXbJomz1klBCsF2Q=";
hash = "sha256-5T5+eBVbyOI89YA9NMLWweHagD09RB3P03HFvaDAOZ8=";
inherit (buildPackages) makeWrapper;
};
x86_64-dmg = callPackage ./build-from-dmg.nix {
inherit pname version metaCommon;
hash = "sha256-350MHWwyjCdvIv6W6lX6Hr6PLDiAwO/e+KW0yKi/Yoc=";
hash = "sha256-PzjE0oJOuPG0S+mA7pgNU3MRgaE2jAPxWEN9J4PfqMQ=";
isAarch64 = false;
};
aarch64-dmg = callPackage ./build-from-dmg.nix {
inherit pname version metaCommon;
hash = "sha256-927CSczgFJcbBJm2cYXucFRidkGAtcowoLMlm2GTafc=";
isAarch64 = true;
};
x86_64-windows = callPackage ./build-from-windows.nix {
inherit pname version metaCommon;
hash = "sha256-48ifhvIWSPmmnBnW8tP7NeWPIWJYWNqGP925O50CAwQ=";
hash = "sha256-+isxkGKxW7H+IjuA5G4yXuvDmX+4UlsD8sXwoHxgLM8=";
};
in
(
if hostPlatform.isDarwin then x86_64-dmg
if hostPlatform.system == "aarch64-darwin" then aarch64-dmg
else if hostPlatform.isDarwin then x86_64-dmg
else if hostPlatform.isCygwin then x86_64-windows
else x86_64-appimage
).overrideAttrs
(oldAttrs: {
passthru = (oldAttrs.passthru or { }) // {
inherit x86_64-appimage x86_64-dmg x86_64-windows;
inherit x86_64-appimage x86_64-dmg aarch64-dmg x86_64-windows;
};
meta = oldAttrs.meta // {
platforms = lib.unique (
x86_64-appimage.meta.platforms
++ x86_64-dmg.meta.platforms
++ aarch64-dmg.meta.platforms
++ x86_64-windows.meta.platforms
);
};