nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 20.09 50 lines 1.8 kB view raw
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 src = fetchurl { 10 url = "https://pkgconfig.freedesktop.org/releases/${pname}-${version}.tar.gz"; 11 sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg"; 12 }; 13 14 outputs = [ "out" "man" "doc" ]; 15 16 # Process Requires.private properly, see 17 # http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to 18 # https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28 19 patches = optional (!vanilla) ./requires-private.patch 20 ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch; 21 22 # These three tests fail due to a (desired) behavior change from our ./requires-private.patch 23 postPatch = if vanilla then null else '' 24 rm -f check/check-requires-private check/check-gtk check/missing 25 ''; 26 27 buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv; 28 29 configureFlags = [ "--with-internal-glib" ] 30 ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] 31 # Can't run these tests while cross-compiling 32 ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) 33 [ "glib_cv_stack_grows=no" 34 "glib_cv_uscore=no" 35 "ac_cv_func_posix_getpwuid_r=yes" 36 "ac_cv_func_posix_getgrgid_r=yes" 37 ]; 38 39 enableParallelBuilding = true; 40 doCheck = true; 41 42 postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file 43 44 meta = { 45 description = "A tool that allows packages to find out information about other packages"; 46 homepage = "http://pkg-config.freedesktop.org/wiki/"; 47 platforms = platforms.all; 48 license = licenses.gpl2Plus; 49 }; 50}