depot/third_party/nixpkgs/pkgs/applications/video/video-trimmer/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

79 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;
};
}