diff options
Diffstat (limited to 'pkgs/development/tools/misc/pkgconfig/default.nix')
-rw-r--r-- | pkgs/development/tools/misc/pkgconfig/default.nix | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index d7246d22ca73..d0e63469987b 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -1,6 +1,9 @@ -{stdenv, fetchurl, automake, libiconv, vanilla ? false}: +{stdenv, fetchurl, automake, libiconv, vanilla ? false }: -stdenv.mkDerivation (rec { +let + inherit (stdenv.lib) optional; +in +stdenv.mkDerivation rec { name = "pkg-config-0.29"; setupHook = ./setup-hook.sh; @@ -12,17 +15,19 @@ stdenv.mkDerivation (rec { ]; sha256 = "0sq09a39wj4cxf8l2jvkq067g08ywfma4v6nhprnf351s82pfl68"; }; + # Process Requires.private properly, see + # http://bugs.freedesktop.org/show_bug.cgi?id=4738. + patches = optional (!vanilla) ./requires-private.patch + ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch; + preConfigure = stdenv.lib.optionalString (stdenv.system == "mips64el-linux") + ''cp -v ${automake}/share/automake*/config.{sub,guess} .''; buildInputs = stdenv.lib.optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv; configureFlags = [ "--with-internal-glib" ] ++ stdenv.lib.optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]; - patches = (if vanilla then [] else [ - # Process Requires.private properly, see - # http://bugs.freedesktop.org/show_bug.cgi?id=4738. - ./requires-private.patch - ]) ++ stdenv.lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch; + postInstall = ''rm "$out"/bin/*-pkg-config''; # clean the duplicate file meta = { description = "A tool that allows packages to find out information about other packages"; @@ -30,9 +35,5 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; -} // (if stdenv.system == "mips64el-linux" then - { - preConfigure = '' - cp -v ${automake}/share/automake*/config.{sub,guess} . - ''; - } else {})) +} + |