From 1742774df8596bdb13033302a498417857d5a11f Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 28 Nov 2015 21:28:27 +0100 Subject: [PATCH] ispc: init at Intel SPMD Program Compiler An open-source compiler for high-performance SIMD programming on the CPU https://ispc.github.io/ --- pkgs/development/compilers/ispc/default.nix | 55 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/compilers/ispc/default.nix diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix new file mode 100644 index 000000000000..1995923842f1 --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7337e8a2713..2fe82edfdd74 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6750,6 +6750,10 @@ let isocodes = callPackage ../development/libraries/iso-codes { }; + ispc = callPackage ../development/compilers/ispc { + llvmPackages = llvmPackages_37; + }; + itk = callPackage ../development/libraries/itk { }; jasper = callPackage ../development/libraries/jasper { };