diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2018-07-21 00:04:19 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2018-10-12 14:11:30 +0200 |
commit | d26c303bef670e33d7211b6c053fdb04983c7692 (patch) | |
tree | 4f8bc2adba41597886887f23371dcbb4b395f69f /pkgs/development/compilers | |
parent | c4afb45af52ab976e2ee18fb1cf06531e0fd35e1 (diff) | |
download | nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar.gz nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar.bz2 nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar.lz nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar.xz nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.tar.zst nixlib-d26c303bef670e33d7211b6c053fdb04983c7692.zip |
futhark: init at 0.6.2
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/futhark/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/compilers/futhark/unwrapped.nix | 55 |
2 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/development/compilers/futhark/default.nix b/pkgs/development/compilers/futhark/default.nix new file mode 100644 index 000000000000..6cabd686b497 --- /dev/null +++ b/pkgs/development/compilers/futhark/default.nix @@ -0,0 +1,24 @@ +{ callPackage, symlinkJoin, makeWrapper, stdenv, gcc, opencl-headers, opencl-icd }: + +let + unwrapped = callPackage ./unwrapped.nix {}; + + path = stdenv.lib.makeBinPath [ gcc ]; + + wrapped = symlinkJoin { + name = "futhark-wrapped"; + buildInputs = [ makeWrapper ]; + paths = [ unwrapped ]; + postBuild = '' + wrapProgram $out/bin/futhark-c \ + --prefix PATH : "${path}" + + wrapProgram $out/bin/futhark-opencl \ + --prefix PATH : "${path}" \ + --set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \ + --set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \ + --set NIX_CFLAGS_LINK "-L${opencl-icd}/lib" + ''; + }; + +in wrapped diff --git a/pkgs/development/compilers/futhark/unwrapped.nix b/pkgs/development/compilers/futhark/unwrapped.nix new file mode 100644 index 000000000000..890be3431c3a --- /dev/null +++ b/pkgs/development/compilers/futhark/unwrapped.nix @@ -0,0 +1,55 @@ +# Generated using `cabal2nix --hpack .`, then replace src +{ mkDerivation, alex, array, base, bifunctors, binary, blaze-html +, bytestring, containers, data-binary-ieee754, directory +, directory-tree, dlist, extra, file-embed, filepath, gitrev, happy +, haskeline, hpack, HUnit, json, language-c-quote, mainland-pretty +, markdown, mtl, neat-interpolation, parallel, parsec, process +, process-extras, QuickCheck, random, raw-strings-qq, regex-tdfa +, srcloc, stdenv, template-haskell, temporary, test-framework +, test-framework-hunit, test-framework-quickcheck2, text +, th-lift-instances, transformers, vector, vector-binary-instances +, zlib, fetchFromGitHub +}: +mkDerivation { + pname = "futhark"; + version = "0.6.2"; + src = fetchFromGitHub { + owner = "diku-dk"; + repo = "futhark"; + rev = "v0.6.2"; + sha256 = "0yj7n01swpvqblybdnks3mjf0mzf1gdg2b2cpxdpxnrjw5j0pnq2"; + }; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + array base bifunctors binary blaze-html bytestring containers + data-binary-ieee754 directory directory-tree dlist extra file-embed + filepath gitrev language-c-quote mainland-pretty markdown mtl + neat-interpolation parallel parsec process raw-strings-qq + regex-tdfa srcloc template-haskell text th-lift-instances + transformers vector vector-binary-instances zlib + ]; + libraryToolDepends = [ alex happy hpack ]; + executableHaskellDepends = [ + array base bifunctors binary blaze-html bytestring containers + data-binary-ieee754 directory directory-tree dlist extra file-embed + filepath gitrev haskeline json language-c-quote mainland-pretty + markdown mtl neat-interpolation parallel parsec process + process-extras random raw-strings-qq regex-tdfa srcloc + template-haskell temporary text th-lift-instances transformers + vector vector-binary-instances zlib + ]; + testHaskellDepends = [ + array base bifunctors binary blaze-html bytestring containers + data-binary-ieee754 directory directory-tree dlist extra file-embed + filepath gitrev HUnit language-c-quote mainland-pretty markdown mtl + neat-interpolation parallel parsec process QuickCheck + raw-strings-qq regex-tdfa srcloc template-haskell test-framework + test-framework-hunit test-framework-quickcheck2 text + th-lift-instances transformers vector vector-binary-instances zlib + ]; + preConfigure = "hpack"; + homepage = "https://futhark-lang.org"; + description = "An optimising compiler for a functional, array-oriented language"; + license = stdenv.lib.licenses.isc; +} |