From d15019d43919e1aa31b0d1b4e51183cc2960a403 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 27 Aug 2019 23:40:01 +0200 Subject: gnome2.libglade: make python2 build optional Python2 is only needed for `libglade-convert`[1] which is a simple script that converts old glade files into new glade files and for tests and docs which we currently don't generate. As Python2 is about to get EOLed and this is mostly a tool to migrate old data, it shouldn't be built by default. With this change, `xscreensaver` and `xsecurelock` don't depend on Python2 anymore. [1] https://manpages.ubuntu.com/manpages/trusty/man1/libglade-convert.1.html --- pkgs/desktops/gnome-2/platform/libglade/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/desktops/gnome-2/platform/libglade/default.nix b/pkgs/desktops/gnome-2/platform/libglade/default.nix index c61ecc16f154..d51cccf79066 100644 --- a/pkgs/desktops/gnome-2/platform/libglade/default.nix +++ b/pkgs/desktops/gnome-2/platform/libglade/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl, pkgconfig, gtk2, libxml2, python, gettext}: +{ stdenv, fetchurl, pkgconfig, gtk2, libxml2, python2 ? null, withLibgladeConvert ? false, gettext }: + +assert withLibgladeConvert -> python2 != null; stdenv.mkDerivation { name = "libglade-2.6.4"; @@ -11,7 +13,8 @@ stdenv.mkDerivation { outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gtk2 python gettext ]; + buildInputs = [ gtk2 gettext ] + ++ stdenv.lib.optional withLibgladeConvert python2; NIX_LDFLAGS = "-lgmodule-2.0"; -- cgit 1.4.1