2024-07-27 06:49:29 +00:00
|
|
|
{ appimageTools
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, pname
|
|
|
|
, version
|
|
|
|
, hash
|
|
|
|
, metaCommon ? { }
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "losslesscut";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mifi/lossless-cut/releases/download/v${version}/LosslessCut-linux-x86_64.AppImage";
|
|
|
|
inherit hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
extracted = appimageTools.extractType2 {
|
|
|
|
inherit pname version src;
|
|
|
|
};
|
|
|
|
in
|
2024-05-15 15:35:15 +00:00
|
|
|
appimageTools.wrapType2 {
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
profile = ''
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
'';
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
(
|
|
|
|
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}/losslesscut.png $out/share/icons/losslesscut.png
|
|
|
|
mkdir $out/share/applications
|
|
|
|
cp ${extracted}/losslesscut.desktop $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/losslesscut.desktop \
|
|
|
|
--replace AppRun losslesscut
|
|
|
|
source "${makeWrapper}/nix-support/setup-hook"
|
|
|
|
wrapProgram "$out/bin/losslesscut" \
|
|
|
|
--add-flags "--disable-seccomp-filter-sandbox"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = metaCommon // {
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
mainProgram = "losslesscut";
|
|
|
|
};
|
|
|
|
}
|