Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 45 lines 1.5 kB view raw
1{stdenv, fetchurl, automake, libiconv, vanilla ? false }: 2 3with stdenv.lib; 4 5stdenv.mkDerivation rec { 6 name = "pkg-config-0.29.2"; 7 8 setupHook = ./setup-hook.sh; 9 10 src = fetchurl { 11 urls = [ 12 "https://pkgconfig.freedesktop.org/releases/${name}.tar.gz" 13 "http://fossies.org/linux/misc/${name}.tar.gz" 14 ]; 15 sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg"; 16 }; 17 # Process Requires.private properly, see 18 # http://bugs.freedesktop.org/show_bug.cgi?id=4738. 19 patches = optional (!vanilla) ./requires-private.patch 20 ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch; 21 22 preConfigure = ""; # TODO(@Ericson2314): Remove next mass rebuild 23 buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv; 24 25 configureFlags = [ "--with-internal-glib" ] 26 ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] 27 # Can't run these tests while cross-compiling 28 ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) 29 [ "glib_cv_stack_grows=no" 30 "glib_cv_uscore=no" 31 "ac_cv_func_posix_getpwuid_r=yes" 32 "ac_cv_func_posix_getgrgid_r=yes" 33 ]; 34 35 36 postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file 37 38 meta = { 39 description = "A tool that allows packages to find out information about other packages"; 40 homepage = http://pkg-config.freedesktop.org/wiki/; 41 platforms = platforms.all; 42 }; 43 44} 45