···11-{
22- lib,
33- stdenv,
44- applyPatches,
55- fetchFromGitHub,
66- cmake,
77- git,
88- llvmPackages_15,
99- spirv-llvm-translator,
1010- buildWithPatches ? true,
1111-}:
1212-1313-let
1414- addPatches =
1515- component: pkg:
1616- pkg.overrideAttrs (oldAttrs: {
1717- postPatch = oldAttrs.postPatch or "" + ''
1818- for p in ${passthru.patchesOut}/${component}/*; do
1919- patch -p1 -i "$p"
2020- done
2121- '';
2222- });
2323-2424- llvmPkgs = llvmPackages_15;
2525- inherit (llvmPkgs) llvm;
2626- spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
2727- libclang = if buildWithPatches then passthru.libclang else llvmPkgs.libclang;
2828-2929- passthru = rec {
3030- spirv-llvm-translator = spirv-llvm-translator';
3131- llvm = addPatches "llvm" llvmPkgs.llvm;
3232- libclang = addPatches "clang" llvmPkgs.libclang;
3333-3434- clang-unwrapped = libclang.out;
3535- clang = llvmPkgs.clang.override {
3636- cc = clang-unwrapped;
3737- };
3838-3939- patchesOut = stdenv.mkDerivation {
4040- pname = "opencl-clang-patches";
4141- inherit version src;
4242- # Clang patches assume the root is the llvm root dir
4343- # but clang root in nixpkgs is the clang sub-directory
4444- postPatch = ''
4545- for filename in patches/clang/*.patch; do
4646- substituteInPlace "$filename" \
4747- --replace-fail "a/clang/" "a/" \
4848- --replace-fail "b/clang/" "b/"
4949- done
5050- '';
5151-5252- installPhase = ''
5353- [ -d patches ] && cp -r patches/ $out || mkdir $out
5454- mkdir -p $out/clang $out/llvm
5555- '';
5656- };
5757- };
5858-5959- version = "15.0.3";
6060- src = applyPatches {
6161- src = fetchFromGitHub {
6262- owner = "intel";
6363- repo = "opencl-clang";
6464- tag = "v${version}";
6565- hash = "sha256-JkYFmnDh7Ot3Br/818aLN33COEG7+xyOf8OhdoJX9Cw=";
6666- };
6767-6868- patches = [
6969- # Build script tries to find Clang OpenCL headers under ${llvm}
7070- # Work around it by specifying that directory manually.
7171- ./opencl-headers-dir.patch
7272- ];
7373-7474- postPatch = ''
7575- # fix not be able to find clang from PATH
7676- substituteInPlace cl_headers/CMakeLists.txt \
7777- --replace-fail " NO_DEFAULT_PATH" ""
7878- ''
7979- + lib.optionalString stdenv.hostPlatform.isDarwin ''
8080- # Uses linker flags that are not supported on Darwin.
8181- sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
8282- substituteInPlace CMakeLists.txt \
8383- --replace-fail '-Wl,--no-undefined' ""
8484- '';
8585- };
8686-in
8787-8888-stdenv.mkDerivation {
8989- pname = "opencl-clang";
9090- inherit version src;
9191-9292- nativeBuildInputs = [
9393- cmake
9494- git
9595- llvm.dev
9696- ];
9797-9898- buildInputs = [
9999- libclang
100100- llvm
101101- spirv-llvm-translator'
102102- ];
103103-104104- cmakeFlags = [
105105- "-DPREFERRED_LLVM_VERSION=${lib.getVersion llvm}"
106106- "-DOPENCL_HEADERS_DIR=${lib.getLib libclang}/lib/clang/${lib.getVersion libclang}/include/"
107107-108108- "-DLLVMSPIRV_INCLUDED_IN_LLVM=OFF"
109109- "-DSPIRV_TRANSLATOR_DIR=${spirv-llvm-translator'}"
110110- ];
111111-112112- inherit passthru;
113113-114114- meta = with lib; {
115115- homepage = "https://github.com/intel/opencl-clang/";
116116- description = "Clang wrapper library with an OpenCL-oriented API and the ability to compile OpenCL C kernels to SPIR-V modules";
117117- license = licenses.ncsa;
118118- maintainers = [ ];
119119- platforms = platforms.all;
120120- # error: invalid value 'CL3.0' in '-cl-std=CL3.0'
121121- broken = stdenv.hostPlatform.isDarwin;
122122- };
123123-}
+1
pkgs/top-level/aliases.nix
···18081808 opencv2 = throw "opencv2 has been removed as it is obsolete and was not used by any other package; please migrate to OpenCV 4"; # Added 2024-08-20
18091809 opencv3 = throw "opencv3 has been removed as it is obsolete and was not used by any other package; please migrate to OpenCV 4"; # Added 2024-08-20
18101810 openafs_1_8 = openafs; # Added 2022-08-22
18111811+ opencl-clang = throw "opencl-clang has been integrated into intel-graphics-compiler"; # Added 2025-09-10
18111812 opencl-info = throw "opencl-info has been removed, as the upstream is unmaintained; consider using 'clinfo' instead"; # Added 2024-06-12
18121813 opencomposite-helper = throw "opencomposite-helper has been removed from nixpkgs as it causes issues with some applications. See https://wiki.nixos.org/wiki/VR#OpenComposite for the recommended setup"; # Added 2024-09-07
18131814 openconnect_gnutls = openconnect; # Added 2022-03-29