diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-21 17:11:06 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-21 17:11:06 +0200 |
| commit | 7ea2e439dded1baa11c4c12207eee8e1033ae104 (patch) | |
| tree | e031429abec9c01b525cd5968d689d0453e88123 /modules/remote-sycl/.nix/adaptive-cpp.nix | |
| parent | 29a4a05eddbe98ff39c7ecbe7bdcd453ec917ec3 (diff) | |
| download | forstio-forstio-7ea2e439dded1baa11c4c12207eee8e1033ae104.tar.gz | |
Random work
Diffstat (limited to 'modules/remote-sycl/.nix/adaptive-cpp.nix')
| -rw-r--r-- | modules/remote-sycl/.nix/adaptive-cpp.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/remote-sycl/.nix/adaptive-cpp.nix b/modules/remote-sycl/.nix/adaptive-cpp.nix new file mode 100644 index 0000000..6c70be0 --- /dev/null +++ b/modules/remote-sycl/.nix/adaptive-cpp.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, makeWrapper +, boost +, llvmPackages +, lld +}: + +let + version = "25.02.0"; +in stdenv.mkDerivation { + pname = "adaptive-cpp-kel-custom"; + inherit version; + + src = fetchFromGitHub { + owner = "AdaptiveCpp"; + repo = "AdaptiveCpp"; + tag = "v${version}"; + sha256 = "sha256-vXfw8+xn3/DYxUKp3QGdQ8sEbDwyk+8jDCyuvQOXigc="; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + ]; + + buildInputs = [ + boost + llvmPackages.openmp + llvmPackages.libclang + llvmPackages.llvm + ]; + + cmakeFlags = [ + "-DCLANG_INCLUDE_PATH=${llvmPackages.libclang.dev}/include" + ]; + + postInstall = '' + if [ -d "$out/include/AdaptiveCpp" ]; then + mv $out/include/AdaptiveCpp .hidden-fake + mv .hidden-fake/* $out/include/ + rmdir .hidden-fake + fi + ''; + + postFixup = '' + wrapProgram $out/bin/syclcc-clang \ + --prefix PATH : ${lib.makeBinPath [ lld ]} \ + --add-flags "-L${llvmPackages.openmp}/lib" \ + --add-flags "-I${llvmPackages.openmp.dev}/include" \ + ''; + + postPatch = '' + patchShebangs . + ''; +} |
