summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2015-11-28 21:28:27 +0100
committerAristid Breitkreuz <aristidb@gmail.com>2015-11-29 00:21:13 +0100
commit1742774df8596bdb13033302a498417857d5a11f (patch)
tree7f50b66b8109cfbcb3daaab3ba2ece2d73f8a135 /pkgs/development/compilers
parentfcc876c3f5c54f5e4207bcc9319f4772b21206a8 (diff)
downloadnixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar.gz
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar.bz2
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar.lz
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar.xz
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.tar.zst
nixpkgs-1742774df8596bdb13033302a498417857d5a11f.zip
ispc: init at <GH master>
Intel SPMD Program Compiler

An open-source compiler for high-performance SIMD programming on the CPU

https://ispc.github.io/
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ispc/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix
new file mode 100644
index 00000000000..1995923842f
--- /dev/null
+++ b/pkgs/development/compilers/ispc/default.nix
@@ -0,0 +1,55 @@
+{stdenv, fetchFromGitHub, which, m4, python, bison, flex, llvmPackages}:
+
+# TODO: patch LLVM so Knights Landing works better (patch included in ispc github)
+
+stdenv.mkDerivation rec {
+  version = "20151128";
+  rev = "d3020580ff18836de2d4cae18901980b551d9d01";
+
+  name = "ispc-${version}";
+
+  src = fetchFromGitHub {
+    owner = "ispc";
+    repo = "ispc";
+    inherit rev;
+    sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn";
+  };
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  buildInputs = with llvmPackages; [
+    which
+    m4
+    python
+    bison
+    flex
+    llvm
+    clang
+  ];
+
+  patchPhase = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ispc $out/bin
+  '';
+
+  checkPhase = ''
+    export ISPC_HOME=$PWD
+    python run_tests.py
+  '';
+
+  makeFlags = [
+    "CLANG_INCLUDE=${llvmPackages.clang-unwrapped}/include"
+    ];
+
+  meta = with stdenv.lib; {
+    homepage = https://ispc.github.io/ ;
+    description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.aristid ];
+  };
+}