diff options
author | Doron Behar <doron.behar@gmail.com> | 2022-09-03 11:19:44 +0300 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2022-09-03 16:13:29 +0300 |
commit | 918d9061fdcdf19a8ea7bf7cd5726c7e023f36b9 (patch) | |
tree | 390d479625d9fe6f1879e69ff4a7fa48277b8b9e /pkgs/applications/video | |
parent | 6bc3e85473f9794eeb990aeea1476a0e92a6fb14 (diff) |
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`.
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/video-trimmer/default.nix | 36 | ||||
-rw-r--r-- | pkgs/applications/video/video-trimmer/remove-screenshot-metainfo.diff | 17 |
2 files changed, 11 insertions, 42 deletions
diff --git a/pkgs/applications/video/video-trimmer/default.nix b/pkgs/applications/video/video-trimmer/default.nix index 25cb522202661..dbeb85821debd 100644 --- a/pkgs/applications/video/video-trimmer/default.nix +++ b/pkgs/applications/video/video-trimmer/default.nix @@ -1,18 +1,15 @@ { stdenv , lib , fetchFromGitLab +, fetchpatch , rustPlatform , gnome , pkg-config , meson , wrapGAppsHook4 -, appstream-glib , desktop-file-utils , blueprint-compiler , ninja -, python3 -, gtk3-x11 -, glib , gobject-introspection , gtk4 , libadwaita @@ -37,31 +34,25 @@ stdenv.mkDerivation rec { }; patches = [ - # The metainfo.xml file has a URL to a screenshot of the application, - # unaccessible in the build's sandbox. We don't need the screenshot, so - # it's best to remove it. - ./remove-screenshot-metainfo.diff + # 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="; + }) ]; - postPatch = '' - patchShebangs \ - build-aux/meson/postinstall.py \ - build-aux/cargo.sh \ - build-aux/dist-vendor.sh - ''; - nativeBuildInputs = [ pkg-config meson wrapGAppsHook4 - appstream-glib + gobject-introspection desktop-file-utils blueprint-compiler ninja - # For post-install.py - python3 - gtk3-x11 # For gtk-update-icon-cache - glib # For glib-compile-schemas + # 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 @@ -69,7 +60,6 @@ stdenv.mkDerivation rec { ]); buildInputs = [ - gobject-introspection gtk4 libadwaita gst_all_1.gstreamer @@ -79,10 +69,6 @@ stdenv.mkDerivation rec { doCheck = true; - passthru.updateScript = gnome.updateScript { - packageName = pname; - }; - meta = with lib; { homepage = "https://gitlab.gnome.org/YaLTeR/video-trimmer"; description = "Trim videos quickly"; diff --git a/pkgs/applications/video/video-trimmer/remove-screenshot-metainfo.diff b/pkgs/applications/video/video-trimmer/remove-screenshot-metainfo.diff deleted file mode 100644 index 2d8741998d14c..0000000000000 --- a/pkgs/applications/video/video-trimmer/remove-screenshot-metainfo.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git i/data/org.gnome.gitlab.YaLTeR.VideoTrimmer.metainfo.xml.in.in w/data/org.gnome.gitlab.YaLTeR.VideoTrimmer.metainfo.xml.in.in -index 9bd25b6..c627369 100644 ---- i/data/org.gnome.gitlab.YaLTeR.VideoTrimmer.metainfo.xml.in.in -+++ w/data/org.gnome.gitlab.YaLTeR.VideoTrimmer.metainfo.xml.in.in -@@ -19,12 +19,6 @@ - Video Trimmer cuts out a fragment of a video given the start and end timestamps. The video is never re-encoded, so the process is very fast and does not reduce the video quality. - </p> - </description> -- <screenshots> -- <screenshot type="default"> -- <image>https://gitlab.gnome.org/YaLTeR/video-trimmer/uploads/e840fa093439348448007197d07c8033/image.png</image> -- <caption>Main Window</caption> -- </screenshot> -- </screenshots> - <releases> - <release version="0.7.1" date="2022-03-23"> - <description> |