2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
2023-01-11 07:51:40 +00:00
|
|
|
, stdenv
|
2022-12-17 10:02:37 +00:00
|
|
|
, callPackage
|
|
|
|
, buildPackages
|
|
|
|
}:
|
|
|
|
|
2021-04-19 03:05:28 +00:00
|
|
|
let
|
2022-12-17 10:02:37 +00:00
|
|
|
pname = "losslesscut";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "3.58.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
metaCommon = with lib; {
|
2021-04-19 03:05:28 +00:00
|
|
|
description = "The swiss army knife of lossless video/audio editing";
|
|
|
|
homepage = "https://mifi.no/losslesscut/";
|
2022-03-10 19:12:11 +00:00
|
|
|
license = licenses.gpl2Only;
|
2021-04-19 03:05:28 +00:00
|
|
|
maintainers = with maintainers; [ ShamrockLee ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "losslesscut";
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-04-19 03:05:28 +00:00
|
|
|
};
|
2022-12-17 10:02:37 +00:00
|
|
|
x86_64-appimage = callPackage ./build-from-appimage.nix {
|
|
|
|
inherit pname version metaCommon;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-wmOdW5LdGLs6Wrt/VBlbC1ScFZBmd5gVQaj/cYADnWc=";
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit (buildPackages) makeWrapper;
|
|
|
|
};
|
|
|
|
x86_64-dmg = callPackage ./build-from-dmg.nix {
|
|
|
|
inherit pname version metaCommon;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-ZNUkzxpFTmsFcdC4oJWDxvqunpaBKz7Fnmrsa4W12Bg=";
|
2022-12-17 10:02:37 +00:00
|
|
|
isAarch64 = false;
|
|
|
|
};
|
|
|
|
aarch64-dmg = callPackage ./build-from-dmg.nix {
|
|
|
|
inherit pname version metaCommon;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-PpQF31qsn9TOIRVzOdDoLUqti+m1uRpBQrrqKtxFleE=";
|
2022-12-17 10:02:37 +00:00
|
|
|
isAarch64 = true;
|
|
|
|
};
|
|
|
|
x86_64-windows = callPackage ./build-from-windows.nix {
|
|
|
|
inherit pname version metaCommon;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-AgWvLU9m2q7fxZYXgHGMgEj1WLP5XzERq7tWcin2/30=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
(
|
2023-01-11 07:51:40 +00:00
|
|
|
if stdenv.hostPlatform.system == "aarch64-darwin" then aarch64-dmg
|
|
|
|
else if stdenv.hostPlatform.isDarwin then x86_64-dmg
|
|
|
|
else if stdenv.hostPlatform.isCygwin then x86_64-windows
|
2022-12-17 10:02:37 +00:00
|
|
|
else x86_64-appimage
|
|
|
|
).overrideAttrs
|
|
|
|
(oldAttrs: {
|
|
|
|
passthru = (oldAttrs.passthru or { }) // {
|
|
|
|
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
|
|
|
|
);
|
|
|
|
};
|
|
|
|
})
|