[openwrt/openwrt] build: fix pkg-config detection when inside of a nix-shell
LEDE Commits
lede-commits at lists.infradead.org
Thu Nov 2 14:45:43 PDT 2023
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/250ab7b7a5349626e16b49721ff08e82cf79a793
commit 250ab7b7a5349626e16b49721ff08e82cf79a793
Author: Sandro Jäckel <sandro.jaeckel at gmail.com>
AuthorDate: Wed Nov 1 16:49:20 2023 +0100
build: fix pkg-config detection when inside of a nix-shell
The output of command_all when inside a nix-shell looks like the below
where /usr does not match:
➜ scripts/command_all.sh pkg-config
/nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config
Signed-off-by: Sandro Jäckel <sandro.jaeckel at gmail.com>
(cherry picked from commit 86ca7199dfb132042ce3110acef23d74f4ef14a7)
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c325034bb9..9bdb03a443 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
world:
-DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
+DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1)
export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)
More information about the lede-commits
mailing list