diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2018-08-20 22:14:32 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2018-10-12 14:12:29 +0200 |
commit | 0c25079958ac46f7438d2a90e837acf7c69a2ab9 (patch) | |
tree | c1c5867d23bd33ce8fe8604ac9aceda04e08e37b /pkgs/development/haskell-modules/configuration-nix.nix | |
parent | d26c303bef670e33d7211b6c053fdb04983c7692 (diff) | |
download | nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar.gz nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar.bz2 nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar.lz nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar.xz nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.tar.zst nixlib-0c25079958ac46f7438d2a90e837acf7c69a2ab9.zip |
futhark: introduce the top-level futhark attribute
The fact that futhark is a Haskell package is an implementation detail. To install it users should just have to specify `futhark` instead of `haskellPackages.futhark`. Additionally futhark is overridden with `haskell.lib.justStaticExecutables` to reduce closure size.
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-nix.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-nix.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index bb9b0e5d5fe6..523f4ed0212c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -528,4 +528,19 @@ self: super: builtins.intersectAttrs super { # The test-suite requires a running PostgreSQL server. Frames-beam = dontCheck super.Frames-beam; + + futhark = with pkgs; + let path = stdenv.lib.makeBinPath [ gcc ]; + in overrideCabal (addBuildTool super.futhark makeWrapper) (_drv: { + postInstall = '' + 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" + ''; + }); } |