1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/pkgs/build-support
sternenseemann b11d65c850 pkg-config-wrapper: mangle PKG_CONFIG_PATH{,_FOR_BUILD} correctly
Previously, mangleVarList would be used which would concatenate the
variables using a space as a separator. Paths are however separated by
`:` in PKG_CONFIG_PATH leading to entries being broken.

This is fixed by introducing mangleVarListGeneric which allows us to
specify the desired separator.

Reproducer for the issue prior to this change:

    $ nix-shell -A pkgsLLVM.wayland
    [nix-shell] $ pkg-config --libs expat
    Package expat was not found in the pkg-config search path.
    Perhaps you should add the directory containing `expat.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'expat' found
    $ printf 'Host: %s\nBuild: %s' $PKG_CONFIG_PATH $PKG_CONFIG_PATH_FOR_BUILD
    Host: /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/z3y9ska2h4l1map25m195iq577g7g3gz-libxml2-x86_64-unknown-linux-gnu-2.9.12-dev/lib/pkgconfig:/nix/store/lbz5m1s0r7zn0cxvl21czfspli6ribzb-zlib-1.2.11-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/rfhvp8r8n3ygpzh8j0l34lk8hwwi3z0h-libffi-3.3-x86_64-unknown-linux-gnu-dev/lib/pkgconfig
    Build: /nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig

strace reveals the issue:

    stat("/nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig/expat-uninstalled.pc", 0x7fff49829fa0) = -1 ENOENT (No such file or directory)

In the pkg-config wrapper $PKG_CONFIG_PATH_FOR_BUILD and
$PKG_CONFIG_PATH are concatenated with a space which leads to two paths
being messed up. This issue likely only affects native cross
compilation.
2021-05-18 00:13:27 +02:00
..
add-opengl-runpath
agda mkShell: introduce packages argument (#122180) 2021-05-13 19:17:29 +02:00
alternatives treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
appimage gnome: rename from gnome3 2021-05-08 09:47:42 +02:00
bintools-wrapper darwin: wrap strip and install_name_tool to codesign modified files 2021-05-17 00:27:02 +09:00
build-bazel-package Merge pull request #114853 from lourkeur/fix-string-escaping 2021-03-03 19:35:16 +09:00
build-dotnet-package treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix 2021-01-19 01:16:25 -08:00
build-fhs-userenv buildFHSUserEnv: symlink /etc/nix 2021-02-26 20:13:28 +01:00
build-fhs-userenv-bubblewrap buildFHSUserEnvBubblewrap: add dieWithParent option, and /etc/nix 2021-05-02 13:38:52 -07:00
build-setupcfg
buildenv trivial-builders: merge passAsFile with env in runCommand' 2021-03-18 19:56:40 +01:00
cc-wrapper treewide: All the linker to be chosen independently 2021-05-14 21:29:51 +00:00
coq coqPackages.multinomials: 1.5.2 -> 1.5.4 (#115427) 2021-03-10 16:25:32 +01:00
docker Merge pull request #118018 from considerate/master 2021-04-16 09:17:44 +02:00
dotnetbuildhelpers treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix 2021-01-19 01:16:25 -08:00
dotnetenv treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
emacs emacs: adapt to renamed native-comp variables 2021-05-06 16:47:21 -03:00
expand-response-params responsie file logic 2021-02-09 09:46:47 +08:00
fetchbitbucket fetchFromBitbucket: remove hack for Mercurial 2021-02-08 17:54:12 +00:00
fetchbower
fetchbzr treewide: editorconfig fixes 2021-01-20 09:11:11 +10:00
fetchcvs fetchcvs: fix ssh wrapper failing due to missing /usr/bin/env 2021-02-08 19:18:17 +01:00
fetchdarcs
fetchdocker treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
fetchfirefoxaddon Merge pull request #106481 from tadfisher/patch-3 2021-01-30 22:31:24 +09:00
fetchfossil
fetchgit fetchgit: document --fetch-lfs flag 2021-05-07 15:38:54 -07:00
fetchgithub
fetchgitiles
fetchgitlab
fetchgitlocal
fetchgx
fetchhg treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
fetchipfs
fetchmavenartifact treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
fetchmtn treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
fetchnuget treewide: unzip buildInputs to nativeBuildInputs (#112302) 2021-02-20 16:01:53 -05:00
fetchpatch
fetchrepoorcz
fetchrepoproject treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
fetchs3 treewide: remove stdenv where not needed 2021-03-04 19:54:50 +07:00
fetchsavannah
fetchsourcehut fetchFromSourcehut: init 2021-03-08 15:51:24 +01:00
fetchsvn treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
fetchsvnrevision
fetchsvnssh
fetchurl fetchurl: check that url is a string 2021-04-01 22:50:22 +02:00
fetchzip fetchzip: accept urls 2021-04-07 02:41:25 +02:00
go garble: fix aarch64 build 2021-02-20 21:13:46 +10:00
icon-conv-tools treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
install-shell-files
kernel treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
libredirect treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
make-desktopitem
make-startupitem
make-symlinks
mkshell mkShell: introduce packages argument (#122180) 2021-05-13 19:17:29 +02:00
mono-dll-fixer
nix-gitignore
nuke-references nukeReferences: fix code signatures on aarch64-darwin 2021-05-17 00:27:03 +09:00
ocaml ocamlPackages.dune: rename into dune_1 2021-03-07 12:07:14 +01:00
oci-tools
pkg-config-wrapper pkg-config-wrapper: mangle PKG_CONFIG_PATH{,_FOR_BUILD} correctly 2021-05-18 00:13:27 +02:00
prefer-remote-fetch
references-by-popularity
release releaseTools: fix nixBuild function 2021-03-29 21:24:00 +02:00
remove-references-to removeReferencesTo: fix code signatures on aarch64-darwin 2021-05-17 00:27:03 +09:00
rust rust: 1.51.0 -> 1.52.0 2021-05-08 11:42:10 -07:00
setup-hooks fixDarwinDylibNames: set name of install_name_tool 2021-05-17 00:27:01 +09:00
singularity-tools treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
skaware treewide: fix double quoted strings in meta.description 2021-01-24 19:56:59 +07:00
snap
src-only
substitute
substitute-files treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
templaterpm treewide: makeWrapper buildInputs to nativeBuildInputs 2021-02-19 20:09:16 +07:00
upstream-updater
vm lzma: deprecate alias 2021-04-04 19:49:52 +02:00
wrapper-common pkg-config-wrapper: mangle PKG_CONFIG_PATH{,_FOR_BUILD} correctly 2021-05-18 00:13:27 +02:00
writers treewide: use perl.withPackages when possible 2021-03-31 21:35:37 +02:00
build-maven.nix
build-pecl.nix Revert "php: Add php package versions to extensions/packages pnames" 2021-03-04 15:26:36 +01:00
closure-info.nix
dhall-to-nix.nix
plugins.nix treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
replace-dependency.nix
setup-systemd-units.nix setupSystemdUnits: use /nix/var/nix/profiles/default/lib/systemd/system as fallback 2021-02-12 12:53:20 +01:00
source-from-head-fun.nix
trivial-builders.nix test-utilities: version test 2021-05-07 09:53:35 +02:00