losslesscut-bin: init at 3.33.1 (#108512)
Add binary package for * Linux (AppImage) * Mac (dmg, x86_64 version) * Windows (zip)
This commit is contained in:
parent
9b3ab07eba
commit
56a4d9857a
|
@ -0,0 +1,45 @@
|
|||
{ appimageTools, lib, fetchurl, gtk3, gsettings-desktop-schemas, version }:
|
||||
|
||||
let
|
||||
pname = "losslesscut";
|
||||
nameRepo = "lossless-cut";
|
||||
nameCamel = "LosslessCut";
|
||||
name = "${pname}-${version}";
|
||||
nameSource = "${nameCamel}-linux.AppImage";
|
||||
nameExecutable = "losslesscut";
|
||||
owner = "mifi";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}";
|
||||
name = nameSource;
|
||||
sha256 = "0aqz5ijl5japfzzbcdcd2mmihkb8b2fc2hs9kkm3211yb37c5ygv";
|
||||
};
|
||||
extracted = appimageTools.extractType2 {
|
||||
inherit name src;
|
||||
};
|
||||
in appimageTools.wrapType2 {
|
||||
inherit name src;
|
||||
|
||||
profile = ''
|
||||
export LC_ALL=C.UTF-8
|
||||
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
|
||||
'';
|
||||
|
||||
extraPkgs = ps: appimageTools.defaultFhsEnvArgs.multiPkgs ps;
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/{${name},${nameExecutable}}
|
||||
(
|
||||
mkdir -p $out/share
|
||||
cd ${extracted}/usr
|
||||
find share -mindepth 1 -type d -exec mkdir -p $out/{} \;
|
||||
find share -mindepth 1 -type f,l -exec ln -s $PWD/{} $out/{} \;
|
||||
)
|
||||
ln -s ${extracted}/${nameExecutable}.png $out/share/icons/${nameExecutable}.png
|
||||
mkdir $out/share/applications
|
||||
cp ${extracted}/${nameExecutable}.desktop $out/share/applications
|
||||
substituteInPlace $out/share/applications/${nameExecutable}.desktop \
|
||||
--replace AppRun ${nameExecutable}
|
||||
'';
|
||||
|
||||
meta.platforms = with lib.platforms; [ "x86_64-linux" ];
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{ callPackage, stdenvNoCC, lib }:
|
||||
let
|
||||
version = "3.33.1";
|
||||
appimage = callPackage ./appimage.nix { inherit version; };
|
||||
dmg = callPackage ./dmg.nix { inherit version; };
|
||||
windows = callPackage ./windows.nix { inherit version; };
|
||||
in (
|
||||
if stdenvNoCC.isDarwin then dmg
|
||||
else if stdenvNoCC.isCygwin then windows
|
||||
else appimage
|
||||
).overrideAttrs
|
||||
(oldAttrs: {
|
||||
meta = with lib; {
|
||||
description = "The swiss army knife of lossless video/audio editing";
|
||||
homepage = "https://mifi.no/losslesscut/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ShamrockLee ];
|
||||
} // oldAttrs.meta // {
|
||||
platforms =
|
||||
appimage.meta.platforms
|
||||
++ dmg.meta.platforms
|
||||
++ windows.meta.platforms;
|
||||
};
|
||||
})
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenvNoCC, lib, fetchurl, undmg, version }:
|
||||
|
||||
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;
|
||||
sha256 = "0xa1avbwar7x7kv5yn2ldca4vj3nwaz0dhjm3bcdy59q914xn3dj";
|
||||
};
|
||||
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;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
{ stdenvNoCC
|
||||
, lib
|
||||
, fetchurl
|
||||
, unzip
|
||||
, version
|
||||
, useMklink ? false
|
||||
, customSymlinkCommand ? null
|
||||
}:
|
||||
let
|
||||
pname = "losslesscut";
|
||||
nameRepo = "lossless-cut";
|
||||
nameCamel = "LosslessCut";
|
||||
nameSourceBase = "${nameCamel}-win";
|
||||
nameSource = "${nameSourceBase}.zip";
|
||||
nameExecutable = "${nameCamel}.exe";
|
||||
owner = "mifi";
|
||||
getSymlinkCommand = if (customSymlinkCommand != null) then customSymlinkCommand
|
||||
else if useMklink then (targetPath: linkPath: "mklink ${targetPath} ${linkPath}")
|
||||
else (targetPath: linkPath: "ln -s ${targetPath} ${linkPath}");
|
||||
in stdenvNoCC.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
name = nameSource;
|
||||
url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}";
|
||||
sha256 = "1rq9frab0jl9y1mgmjhzsm734jvz0a646zq2wi5xzzspn4wikhvb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
unpackPhase = ''
|
||||
unzip $src -d ${nameSourceBase}
|
||||
'';
|
||||
|
||||
sourceRoot = nameSourceBase;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec
|
||||
cd ..
|
||||
mv ${nameSourceBase} $out/libexec
|
||||
|
||||
'' + (getSymlinkCommand "${nameSourceBase}/${nameExecutable}" "$out/bin/${nameExecutable}");
|
||||
|
||||
meta.platforms = lib.platforms.windows;
|
||||
}
|
|
@ -24239,6 +24239,8 @@ in
|
|||
portaudio = null;
|
||||
};
|
||||
|
||||
losslesscut-bin = callPackage ../applications/video/losslesscut-bin { };
|
||||
|
||||
loxodo = callPackage ../applications/misc/loxodo { };
|
||||
|
||||
lsd2dsl = libsForQt5.callPackage ../applications/misc/lsd2dsl { };
|
||||
|
|
Loading…
Reference in New Issue