2022-09-09 14:08:57 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2022-09-09 14:08:57 +00:00
|
|
|
, pkg-config
|
|
|
|
, meson
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2022-09-09 14:08:57 +00:00
|
|
|
, wrapGAppsHook4
|
|
|
|
, desktop-file-utils
|
|
|
|
, blueprint-compiler
|
|
|
|
, ninja
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, gst_all_1
|
2022-10-21 18:38:19 +00:00
|
|
|
, ffmpeg-full
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "video-trimmer";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.8.1";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "YaLTeR";
|
2022-10-21 18:38:19 +00:00
|
|
|
repo = pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-nr0PAvp4wlswQBNN2LLyYQMpk3IIleHf3+978XhUGGQ=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-YFbLMpQbHUtxRrBVarcoIeDsvc26NWc1YhMeCaLgJAc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
wrapGAppsHook4
|
|
|
|
desktop-file-utils
|
|
|
|
blueprint-compiler
|
|
|
|
ninja
|
|
|
|
# Present here in addition to buildInputs, because meson runs
|
|
|
|
# `gtk4-update-icon-cache` during installPhase, thanks to:
|
|
|
|
# https://gitlab.gnome.org/YaLTeR/video-trimmer/-/merge_requests/12
|
|
|
|
gtk4
|
2023-05-24 13:37:59 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
2022-10-30 15:09:59 +00:00
|
|
|
gst_all_1.gst-plugins-good # for scaletempo and webm
|
2022-09-09 14:08:57 +00:00
|
|
|
gst_all_1.gst-plugins-bad
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg-full ]}"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.gnome.org/YaLTeR/video-trimmer";
|
|
|
|
description = "Trim videos quickly";
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|