summaryrefslogtreecommitdiff
path: root/.nix/adaptive-cpp.nix
diff options
context:
space:
mode:
Diffstat (limited to '.nix/adaptive-cpp.nix')
-rw-r--r--.nix/adaptive-cpp.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/.nix/adaptive-cpp.nix b/.nix/adaptive-cpp.nix
new file mode 100644
index 0000000..f2d5f9b
--- /dev/null
+++ b/.nix/adaptive-cpp.nix
@@ -0,0 +1,50 @@
+{ 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"
+ ];
+
+ 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 .
+ '';
+}