nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, libiconv, vanilla ? false }:
2
3with stdenv.lib;
4
5stdenv.mkDerivation rec {
6 pname = "pkg-config";
7 version = "0.29.2";
8
9 setupHook = ./setup-hook.sh;
10
11 src = fetchurl {
12 url = "https://pkgconfig.freedesktop.org/releases/${pname}-${version}.tar.gz";
13 sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg";
14 };
15
16 # Process Requires.private properly, see
17 # http://bugs.freedesktop.org/show_bug.cgi?id=4738.
18 patches = optional (!vanilla) ./requires-private.patch
19 ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
20
21 # These three tests fail due to a (desired) behavior change from our ./requires-private.patch
22 postPatch = ''
23 rm -f check/check-requires-private check/check-gtk check/missing
24 '';
25
26 buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
27
28 configureFlags = [ "--with-internal-glib" ]
29 ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
30 # Can't run these tests while cross-compiling
31 ++ optional (stdenv.hostPlatform != stdenv.buildPlatform)
32 [ "glib_cv_stack_grows=no"
33 "glib_cv_uscore=no"
34 "ac_cv_func_posix_getpwuid_r=yes"
35 "ac_cv_func_posix_getgrgid_r=yes"
36 ];
37
38 enableParallelBuilding = true;
39 doCheck = true;
40
41 postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
42
43 meta = {
44 description = "A tool that allows packages to find out information about other packages";
45 homepage = http://pkg-config.freedesktop.org/wiki/;
46 platforms = platforms.all;
47 license = licenses.gpl2Plus;
48 };
49}