about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch b/nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch
new file mode 100644
index 000000000000..1603a1278b0e
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch
@@ -0,0 +1,12 @@
+diff --git a/freestanding/Makefile b/freestanding/Makefile
+index f22d220d..3e97b4c5 100644
+--- a/freestanding/Makefile
++++ b/freestanding/Makefile
+@@ -1,4 +1,6 @@
+-PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig
++ifneq (, $(shell command -v opam))
++	PKG_CONFIG_PATH ?= $(shell opam config var prefix)/lib/pkgconfig
++endif
+ 
+ EXISTS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists ocaml-freestanding; echo $$?)
+