From 56ea7df62dd8b0d2fd7160d100c930c84e9ba28b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Nov 2009 23:26:14 +0000 Subject: [PATCH] * Several buildInputs of Gnome-related packages should be propagatedBuildInputs, because those inputs are required by the *.pc or *.la files of the package: - If a *.pc file references a non-propagated input, then Gnome packages have the bad tendency to silently ignore this problem in configure scripts - the failure of a command like `pkg-config --cflags foo' will be ignored if a dependency of foo.pc is missing, so no flags will be added, and the build will fail later on a missing header or library. - If a *.la file references a non-propagated input, the build will also fail, because Libtool will add library dependencies that it cannot find. (Arguably *.la files should never reference packages that aren't in the corresponding *.pc file, but they do it anyway). By setting the propagatedBuildInputs properly, it should be possible to get rid of all the NIX_CFLAGS_COMPILE / NIX_LDFLAGS hacks in the Gnome expressions. svn path=/nixpkgs/branches/xorg-7.5/; revision=18084 --- pkgs/desktops/gnome-2.28/default.nix | 8 ++++---- .../desktops/gnome-2.28/platform/GConf/default.nix | 14 +++++--------- .../gnome-2.28/platform/ORBit2/default.nix | 5 ++++- .../gnome-2.28/platform/esound/default.nix | 5 ++++- .../gnome-2.28/platform/gnome-vfs/default.nix | 10 ++++++++-- .../gnome-2.28/platform/libgnome/default.nix | 11 ++++++----- pkgs/development/libraries/policykit/default.nix | 6 +++--- 7 files changed, 34 insertions(+), 25 deletions(-) diff --git a/pkgs/desktops/gnome-2.28/default.nix b/pkgs/desktops/gnome-2.28/default.nix index 082b72a048d4..5a5cc9dbecf3 100644 --- a/pkgs/desktops/gnome-2.28/default.nix +++ b/pkgs/desktops/gnome-2.28/default.nix @@ -44,8 +44,8 @@ rec { }; GConf = import ./platform/GConf { - inherit (pkgs) stdenv fetchurl pkgconfig dbus_glib libxml2 expat policykit; - inherit (pkgs.gtkLibs) glib gtk; + inherit (pkgs) stdenv fetchurl pkgconfig dbus_glib libxml2 policykit; + inherit (pkgs.gtkLibs) glib; inherit intltool ORBit2; dbus_libs = pkgs.dbus.libs; }; @@ -80,9 +80,9 @@ rec { }; libgnome = import ./platform/libgnome { - inherit (pkgs) stdenv fetchurl pkgconfig popt; + inherit (pkgs) stdenv fetchurl pkgconfig popt zlib; inherit (pkgs.gtkLibs) glib; - inherit intltool esound audiofile libbonobo GConf gnome_vfs ORBit2; + inherit intltool esound libbonobo GConf gnome_vfs ORBit2; }; libgnomeui = import ./platform/libgnomeui { diff --git a/pkgs/desktops/gnome-2.28/platform/GConf/default.nix b/pkgs/desktops/gnome-2.28/platform/GConf/default.nix index 661a20e2b659..1b3af898f6eb 100644 --- a/pkgs/desktops/gnome-2.28/platform/GConf/default.nix +++ b/pkgs/desktops/gnome-2.28/platform/GConf/default.nix @@ -1,18 +1,14 @@ -{ stdenv, fetchurl, pkgconfig, dbus_glib, glib, gtk, ORBit2, libxml2 -, expat, policykit, intltool, dbus_libs}: +{ stdenv, fetchurl, pkgconfig, dbus_glib, glib, ORBit2, libxml2 +, policykit, intltool, dbus_libs }: stdenv.mkDerivation { name = "GConf-2.26.2"; + src = fetchurl { url = mirror://gnome/platform/2.26/2.26.2/sources/GConf-2.26.2.tar.bz2; sha256 = "1vb7hjxddy54g4vch936621g66n0mhi3wkhm9lwqh449vdqg4yki"; }; - preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${dbus_glib}/include/dbus-1.0 -I${policykit}/include/PolicyKit -I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${dbus_libs}/include/dbus-1.0 -I${dbus_libs}/lib/dbus-1.0/include" - export NIX_LDFLAGS="$NIX_LDFLAGS $(glib-config --libs)" - ''; - - buildInputs = [ pkgconfig glib gtk dbus_glib ORBit2 libxml2 - expat policykit intltool dbus_libs]; + buildInputs = [ pkgconfig ORBit2 dbus_libs dbus_glib libxml2 policykit intltool ]; + propagatedBuildInputs = [ glib ]; } diff --git a/pkgs/desktops/gnome-2.28/platform/ORBit2/default.nix b/pkgs/desktops/gnome-2.28/platform/ORBit2/default.nix index 42db2b450713..0d536e830b1f 100644 --- a/pkgs/desktops/gnome-2.28/platform/ORBit2/default.nix +++ b/pkgs/desktops/gnome-2.28/platform/ORBit2/default.nix @@ -2,9 +2,12 @@ stdenv.mkDerivation { name = "ORBit2-2.14.17"; + src = fetchurl { url = mirror://gnome/sources/ORBit2/2.14/ORBit2-2.14.17.tar.bz2; sha256 = "0k4px2f949ac7vmj7b155g1rpf7pmvl48sbnkjhlg4wgcwzwxgv2"; }; - buildInputs = [ pkgconfig glib libIDL ]; + + buildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ glib libIDL ]; } diff --git a/pkgs/desktops/gnome-2.28/platform/esound/default.nix b/pkgs/desktops/gnome-2.28/platform/esound/default.nix index 45dd6655a454..e273251bfa58 100644 --- a/pkgs/desktops/gnome-2.28/platform/esound/default.nix +++ b/pkgs/desktops/gnome-2.28/platform/esound/default.nix @@ -2,9 +2,12 @@ stdenv.mkDerivation { name = "esound-0.2.41"; + src = fetchurl { url = mirror://gnome/sources/esound/0.2/esound-0.2.41.tar.bz2; sha256 = "04a9ldy7hsvry1xmfhzg5is2dabsp8m6a82vkai64d2blqlxvday"; }; - buildInputs = [ pkgconfig alsaLib audiofile ]; + + buildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ alsaLib audiofile ]; } diff --git a/pkgs/desktops/gnome-2.28/platform/gnome-vfs/default.nix b/pkgs/desktops/gnome-2.28/platform/gnome-vfs/default.nix index 2a7044c5a207..4772e2ded9e7 100644 --- a/pkgs/desktops/gnome-2.28/platform/gnome-vfs/default.nix +++ b/pkgs/desktops/gnome-2.28/platform/gnome-vfs/default.nix @@ -3,10 +3,16 @@ stdenv.mkDerivation { name = "gnome-vfs-2.24.1"; + src = fetchurl { url = mirror://gnome/sources/gnome-vfs/2.24/gnome-vfs-2.24.1.tar.bz2; sha256 = "1dmyr8nj77717r8dhwkixpar2yp8ld3r683gp222n59v61718ndw"; }; - buildInputs = [ pkgconfig libxml2 bzip2 openssl samba dbus_glib glib fam hal cdparanoia - intltool GConf gnome_mime_data ]; + + buildInputs = + [ pkgconfig libxml2 bzip2 openssl samba dbus_glib fam hal cdparanoia + intltool gnome_mime_data + ]; + + propagatedBuildInputs = [ GConf glib ]; } diff --git a/pkgs/desktops/gnome-2.28/platform/libgnome/default.nix b/pkgs/desktops/gnome-2.28/platform/libgnome/default.nix index ba403cf5adb9..a5a7c47c949f 100644 --- a/pkgs/desktops/gnome-2.28/platform/libgnome/default.nix +++ b/pkgs/desktops/gnome-2.28/platform/libgnome/default.nix @@ -1,13 +1,14 @@ -{ stdenv, fetchurl, pkgconfig, glib, popt -, intltool, esound, audiofile, libbonobo, GConf, gnome_vfs, ORBit2}: +{ stdenv, fetchurl, pkgconfig, glib, popt, zlib +, intltool, esound, libbonobo, GConf, gnome_vfs, ORBit2}: stdenv.mkDerivation { name = "libgnome-2.28.0"; + src = fetchurl { url = mirror://gnome/sources/libgnome/2.28/libgnome-2.28.0.tar.bz2; sha256 = "03hc1m88swxxw4cq491kz7495ksv762imamzbbvhci41bc40anwv"; }; - buildInputs = [ pkgconfig glib popt intltool esound audiofile libbonobo GConf gnome_vfs ]; - CPPFLAGS = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${ORBit2}/include/orbit-2.0 -I${libbonobo}/include/libbonobo-2.0 -I${libbonobo}/include/bonobo-activation-2.0 -I${GConf}/include/gconf/2 -I${gnome_vfs}/include/gnome-vfs-2.0"; - LIBS = "-lesd -lgconf-2 -lbonobo-activation -lbonobo-2 -lgnomevfs-2"; + + buildInputs = [ pkgconfig popt zlib intltool esound GConf gnome_vfs ]; + propagatedBuildInputs = [ glib libbonobo ]; } diff --git a/pkgs/development/libraries/policykit/default.nix b/pkgs/development/libraries/policykit/default.nix index 90ab6fb45bbd..067e8d50e22e 100644 --- a/pkgs/development/libraries/policykit/default.nix +++ b/pkgs/development/libraries/policykit/default.nix @@ -10,9 +10,9 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkgconfig glib dbus.libs dbus_glib expat pam intltool - gettext libxslt - ]; + [ pkgconfig glib dbus_glib pam intltool gettext libxslt ]; + + propagatedBuildInputs = [ expat dbus.libs ]; configureFlags = "--localstatedir=/var --sysconfdir=/etc";