nixpkgs/pkgs/desktops/gnome-2/platform/libglade/default.nix
Maximilian Bosch d15019d439
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
2019-08-28 01:33:20 +02:00

23 lines
597 B
Nix

{ stdenv, fetchurl, pkgconfig, gtk2, libxml2, python2 ? null, withLibgladeConvert ? false, gettext }:
assert withLibgladeConvert -> python2 != null;
stdenv.mkDerivation {
name = "libglade-2.6.4";
src = fetchurl {
url = mirror://gnome/sources/libglade/2.6/libglade-2.6.4.tar.bz2;
sha256 = "1v2x2s04jry4gpabws92i0wq2ghd47yr5n9nhgnkd7c38xv1wdk4";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 gettext ]
++ stdenv.lib.optional withLibgladeConvert python2;
NIX_LDFLAGS = "-lgmodule-2.0";
propagatedBuildInputs = [ libxml2 ];
}