about summary refs log tree commit diff
path: root/pkgs/development/libraries/libclc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libclc')
-rw-r--r--pkgs/development/libraries/libclc/default.nix7
-rw-r--r--pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch10
2 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libclc/default.nix b/pkgs/development/libraries/libclc/default.nix
index 1db2819a57b5..a0b8cb8efa08 100644
--- a/pkgs/development/libraries/libclc/default.nix
+++ b/pkgs/development/libraries/libclc/default.nix
@@ -14,6 +14,10 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
+  patches = [
+    ./libclc-gnu-install-dirs.patch
+  ];
+
   # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch
   postPatch = ''
     substituteInPlace CMakeLists.txt \
@@ -35,9 +39,6 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ninja python3 ];
   buildInputs = [ llvm_14 ];
   strictDeps = true;
-  cmakeFlags = [
-    "-DCMAKE_INSTALL_INCLUDEDIR=include"
-  ];
 
   postInstall = ''
     install -Dt $dev/bin prepare_builtins
diff --git a/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch b/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch
new file mode 100644
index 000000000000..1e5108a27c38
--- /dev/null
+++ b/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch
@@ -0,0 +1,10 @@
+--- a/libclc.pc.in
++++ b/libclc.pc.in
+@@ -1,5 +1,5 @@
+-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
+-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc
+ 
+ Name: libclc
+ Description: Library requirements of the OpenCL C programming language