nixpkgs/pkgs/applications/video/video-trimmer/default.nix
Doron Behar 918d9061fd video-trimmer: Handle post-merge reviews
- Don't use appstream-glib and remove patch for `metainfo.xml.in.in` as
  it's not really required.
- Use an upstreamed patch that makes gtk3, python3 & glib not required,
  along with patching shebang of `post-install.py`.
- Remove `updateScript` as it's not suitable for non-gnome applications.
- Move gobject-introspection to `nativeBuildInputs`.
2022-09-03 16:13:29 +03:00

80 lines
1.8 KiB
Nix

{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, rustPlatform
, gnome
, pkg-config
, meson
, wrapGAppsHook4
, desktop-file-utils
, blueprint-compiler
, ninja
, gobject-introspection
, gtk4
, libadwaita
, gst_all_1
}:
stdenv.mkDerivation rec {
pname = "video-trimmer";
version = "0.7.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "YaLTeR";
repo = "video-trimmer";
rev = "v${version}";
sha256 = "sha256-D7wjJkdqqjjwwYEUZnNr7hFQK59wfTnaCLXCy+SK8Jo=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-cB5dVrEbISvHrOb87uVZSkT694VKtPtyk+c1tYNCTp0=";
};
patches = [
# https://gitlab.gnome.org/YaLTeR/video-trimmer/-/merge_requests/12
(fetchpatch {
url = "https://gitlab.gnome.org/YaLTeR/video-trimmer/-/commit/2faf4bb13d44463ea940c39ece9187f76627dbe9.diff";
sha256 = "sha256-BPjwfFCDIqnS1rAlIinQ982VKdAYLyzDAPLCmPDvdp4=";
})
];
nativeBuildInputs = [
pkg-config
meson
wrapGAppsHook4
gobject-introspection
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
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = [
gtk4
libadwaita
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
];
doCheck = true;
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;
};
}