about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-10-28 14:24:04 +0300
committerK900 <me@0upti.me>2023-10-28 15:26:11 +0300
commite6cbaa94f9e429ce4af482299a8f54701ea474c9 (patch)
tree7011a2998cf33dc01b3112d2741122ccd749e1d9 /pkgs/development/libraries
parent2bfbf5b984a8ec9fbf2cd98aca5b24cc37408887 (diff)
libclc: absorb into llvmPackages(16)
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/libclc/default.nix54
-rw-r--r--pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch10
-rw-r--r--pkgs/development/libraries/mesa/default.nix3
3 files changed, 1 insertions, 66 deletions
diff --git a/pkgs/development/libraries/libclc/default.nix b/pkgs/development/libraries/libclc/default.nix
deleted file mode 100644
index 9148deeee6f40..0000000000000
--- a/pkgs/development/libraries/libclc/default.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, buildPackages, ninja, cmake, python3, llvm_14 }:
-
-stdenv.mkDerivation rec {
-  pname = "libclc";
-  version = "16.0.3";
-
-  src = fetchFromGitHub {
-    owner = "llvm";
-    repo = "llvm-project";
-    rev = "llvmorg-${version}";
-    hash = "sha256-paWwnoU3XMqreRgh9JbT1tDMTwq/ZL0ss3SJTteEGL0=";
-  };
-  sourceRoot = "${src.name}/libclc";
-
-  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 \
-      --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
-                'find_program( LLVM_CLANG clang PATHS "${buildPackages.clang_14.cc}/bin" NO_DEFAULT_PATH )' \
-      --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
-                'find_program( LLVM_AS llvm-as PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \
-      --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
-                'find_program( LLVM_LINK llvm-link PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \
-      --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
-                'find_program( LLVM_OPT opt PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \
-      --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
-                'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator}/bin" NO_DEFAULT_PATH )'
-  '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
-    substituteInPlace CMakeLists.txt \
-      --replace 'COMMAND prepare_builtins' 'COMMAND ${buildPackages.libclc.dev}/bin/prepare_builtins'
-  '';
-
-  nativeBuildInputs = [ cmake ninja python3 ];
-  buildInputs = [ llvm_14 ];
-  strictDeps = true;
-
-  postInstall = ''
-    install -Dt $dev/bin prepare_builtins
-  '';
-
-  meta = with lib; {
-    broken = stdenv.isDarwin;
-    homepage = "http://libclc.llvm.org/";
-    description = "Implementation of the library requirements of the OpenCL C programming language";
-    license = licenses.mit;
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch b/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch
deleted file mode 100644
index 1e5108a27c38f..0000000000000
--- a/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 58ffc6ae21489..3f5b4c779a9ee 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -64,7 +64,6 @@
 , enableOSMesa ? stdenv.isLinux
 , enableOpenCL ? stdenv.isLinux && stdenv.isx86_64
 , enablePatentEncumberedCodecs ? true
-, libclc
 , jdupes
 , rustc
 , rust-bindgen
@@ -226,7 +225,7 @@ self = stdenv.mkDerivation {
     python3Packages.python # for shebang
   ] ++ lib.optionals haveWayland [ wayland wayland-protocols ]
     ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ]
-    ++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ]
+    ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ]
     ++ lib.optional withValgrind valgrind-light
     ++ lib.optional haveZink vulkan-loader
     ++ lib.optional haveDozen directx-headers;