@@ -1,7 +1,7 @@
1−{ stdenv, fetchFromGitHub, gnome3, libtool, intltool, pkgconfig, gtk3, hicolor-icon-theme, wrapGAppsHook } :
1+{ stdenv, fetchFromGitHub, fetchpatch, gnome3, meson, ninja, gettext, pkgconfig, libxml2, gtk3, hicolor-icon-theme, wrapGAppsHook }:
22
33let
4− version = "2.2";
4+ version = "2.3";
55in stdenv.mkDerivation {
66 name = "gcolor3-${version}";
77
@@ -9,23 +9,35 @@ in stdenv.mkDerivation {
99 owner = "hjdskes";
1010 repo = "gcolor3";
1111 rev = "v${version}";
12− sha256 = "1rbahsi33pfggpj5cigy6wy5333g3rpm8v2q0b35c6m7pwhmf2gr";
12+ sha256 = "186j72kwsqdcakvdik9jl18gz3csdj53j3ylwagr9gfwmy0nmyjb";
1313 };
1414
15− nativeBuildInputs = [ gnome3.gnome-common libtool intltool pkgconfig hicolor-icon-theme wrapGAppsHook ];
15+ patches = [
16+ # Fix darwin build
17+ (fetchpatch {
18+ url = https://github.com/Hjdskes/gcolor3/commit/9130ffeff091fbafff6a0c8f06b09f54657d5dfd.patch;
19+ sha256 = "1kn5hx536wivafb4awg7lsa8h32njy0lynmn7ci9y78dlp54057r";
20+ })
21+ (fetchpatch {
22+ url = https://github.com/Hjdskes/gcolor3/commit/8d89081a8e13749f5a9051821114bc5fe814eaf3.patch;
23+ sha256 = "1ldyr84dl2g6anqkp2mpxsrcr41fcqwi6ck14rfhai7rgrm8yar3";
24+ })
25+ ];
1626
17− buildInputs = [ gtk3 ];
27+ nativeBuildInputs = [ meson ninja gettext pkgconfig libxml2 wrapGAppsHook ];
1828
19− configureScript = "./autogen.sh";
29+ buildInputs = [ gtk3 hicolor-icon-theme ];
2030
21− # clang-4.0: error: argument unused during compilation: '-pthread'
22− NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-error=unused-command-line-argument";
31+ postPatch = ''
32+ chmod +x meson_install.sh # patchShebangs requires executable file
33+ patchShebangs meson_install.sh
34+ '';
2335
24− meta = {
36+ meta = with stdenv.lib; {
2537 description = "A simple color chooser written in GTK3";
2638 homepage = https://hjdskes.github.io/projects/gcolor3/;
27− license = stdenv.lib.licenses.gpl2;
28− maintainers = with stdenv.lib.maintainers; [ jtojnar ];
29− platforms = stdenv.lib.platforms.unix;
39+ license = licenses.gpl2;
40+ maintainers = with maintainers; [ jtojnar ];
41+ platforms = platforms.unix;
3042 };
3143}