From 11861b7c97af2c64761e68763dd3d13a1508fd4e Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Tue, 8 Aug 2017 22:43:54 +0200 Subject: [PATCH] pcmanfm: build with gtk3 --- pkgs/applications/misc/pcmanfm/default.nix | 12 ++++++++++-- pkgs/development/libraries/libfm/default.nix | 13 +++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/pcmanfm/default.nix b/pkgs/applications/misc/pcmanfm/default.nix index 137d68d81711..8251c07206d4 100644 --- a/pkgs/applications/misc/pcmanfm/default.nix +++ b/pkgs/applications/misc/pcmanfm/default.nix @@ -1,5 +1,11 @@ -{ stdenv, fetchurl, glib, gtk2, intltool, libfm, libX11, pango, pkgconfig }: +{ stdenv, fetchurl, glib, intltool, libfm, libX11, pango, pkgconfig +, withGtk3 ? true, gtk2, gtk3 }: +let + libfm' = libfm.override { inherit withGtk3; }; + gtk = if withGtk3 then gtk3 else gtk2; + inherit (stdenv.lib) optional; +in stdenv.mkDerivation rec { name = "pcmanfm-1.2.5"; src = fetchurl { @@ -7,7 +13,9 @@ stdenv.mkDerivation rec { sha256 = "0rxdh0dfzc84l85c54blq42gczygq8adhr3l9hqzy1dp530cm1hc"; }; - buildInputs = [ glib gtk2 intltool libfm libX11 pango pkgconfig ]; + buildInputs = [ glib gtk intltool libfm' libX11 pango pkgconfig ]; + + configureFlags = optional withGtk3 "--with-gtk=3"; meta = with stdenv.lib; { homepage = http://blog.lxde.org/?cat=28/; diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix index c32866a0d26a..d42425c8e185 100644 --- a/pkgs/development/libraries/libfm/default.nix +++ b/pkgs/development/libraries/libfm/default.nix @@ -1,6 +1,8 @@ -{ stdenv, fetchurl, glib, gtk2, intltool, menu-cache, pango, pkgconfig, vala_0_34 -, extraOnly ? false }: +{ stdenv, fetchurl, glib, intltool, menu-cache, pango, pkgconfig, vala_0_34 +, extraOnly ? false +, withGtk3 ? false, gtk2, gtk3 }: let + gtk = if withGtk3 then gtk3 else gtk2; inherit (stdenv.lib) optional; in stdenv.mkDerivation rec { @@ -14,10 +16,13 @@ stdenv.mkDerivation rec { sha256 = "0nlvfwh09gbq8bkbvwnw6iqr918rrs9gc9ljb9pjspyg408bn1n7"; }; - buildInputs = [ glib gtk2 intltool pango pkgconfig vala_0_34 ] + buildInputs = [ glib gtk intltool pango pkgconfig vala_0_34 ] ++ optional (!extraOnly) menu-cache; - configureFlags = optional extraOnly "--with-extra-only"; + configureFlags = [ (optional extraOnly "--with-extra-only") + (optional withGtk3 "--with-gtk=3") ]; + + enableParallelBuilding = true; meta = with stdenv.lib; { homepage = http://blog.lxde.org/?cat=28/;