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
This commit is contained in:
Maximilian Bosch 2019-08-27 23:40:01 +02:00
parent c09bc3e7e2
commit d15019d439
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -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";