From b4080f3eb5df796f2210bc6d43e897b04463d038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 2 Apr 2020 15:36:35 +0100 Subject: [PATCH] clipit: 1.4.2 -> 1.4.4 --- pkgs/applications/misc/clipit/default.nix | 37 ++++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/clipit/default.nix b/pkgs/applications/misc/clipit/default.nix index 129516a44982..82d6272aadcd 100644 --- a/pkgs/applications/misc/clipit/default.nix +++ b/pkgs/applications/misc/clipit/default.nix @@ -1,20 +1,41 @@ -{ fetchurl, stdenv, intltool, pkgconfig, gtk2, xdotool }: +{ fetchFromGitHub, fetchpatch, stdenv +, autoreconfHook, intltool, pkgconfig +, gtk3, xdotool, which, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "clipit"; - version = "1.4.2"; + version = "1.4.4"; - src = fetchurl { - url = "https://github.com/downloads/shantzu/ClipIt/${pname}-${version}.tar.gz"; - sha256 = "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"; + src = fetchFromGitHub { + owner = "shantzu"; + repo = "ClipIt"; + rev = "v${version}"; + sha256 = "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ intltool gtk2 xdotool ]; + patches = [ + # gtk3 support, can be removed in the next release + (fetchpatch { + url = "https://github.com/CristianHenzel/ClipIt/commit/22e012c7d406436e1785b6dd3c4c138b25f68431.patch"; + sha256 = "0la4gc324dzxpx6nk2lqg5fmjgjpm2pyvzwddmfz1il8hqvrqg3j"; + }) + ]; + + preConfigure = '' + intltoolize --copy --force --automake + ''; + + nativeBuildInputs = [ pkgconfig wrapGAppsHook autoreconfHook intltool ]; + configureFlags = [ "--with-gtk3" ]; + buildInputs = [ gtk3 ]; + + gappsWrapperArgs = [ + "--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ xdotool which ]}" + ]; meta = with stdenv.lib; { description = "Lightweight GTK Clipboard Manager"; - homepage = "http://clipit.rspwn.com"; + inherit (src.meta) homepage; license = licenses.gpl3; platforms = platforms.linux; };