diff options
author | Troels Henriksen <athas@sigkill.dk> | 2020-03-30 08:18:51 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2020-04-03 22:00:26 +0200 |
commit | 88c70b16b5355270f4b1e5b25fb637466b790da6 (patch) | |
tree | f3717276c2f139cedc53b08d711516a11d9bb287 /pkgs/development/haskell-modules | |
parent | f447e4cf6accb57821aeda47de9da6b17a009222 (diff) | |
download | nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar.gz nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar.bz2 nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar.lz nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar.xz nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.tar.zst nixlib-88c70b16b5355270f4b1e5b25fb637466b790da6.zip |
futhark: build and install manpages
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-nix.nix | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index ff1c01aa8e87..4aa3327e2b48 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -572,17 +572,34 @@ self: super: builtins.intersectAttrs super { # The test-suite requires a running PostgreSQL server. Frames-beam = dontCheck super.Frames-beam; - futhark = if pkgs.stdenv.isDarwin then super.futhark else with pkgs; - let path = stdenv.lib.makeBinPath [ gcc ]; - in overrideCabal (addBuildTool super.futhark makeWrapper) (_drv: { - postInstall = '' - wrapProgram $out/bin/futhark \ - --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${ocl-icd}/lib" - ''; - }); + # * Compile manpages (which are in RST and are compiled with Sphinx). + # + # * Wrap so that binary can find GCC and OpenCL headers (dubious if + # a good idea). + futhark = with pkgs; + let maybeWrap = + if pkgs.stdenv.isDarwin then "" + else + let path = stdenv.lib.makeBinPath [ gcc ]; + in '' + wrapProgram $out/bin/futhark \ + --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${ocl-icd}/lib" + ''; + in overrideCabal (addBuildTools super.futhark [makeWrapper python37Packages.sphinx]) + (_drv: { + postBuild = (_drv.postBuild or "") + '' + make -C docs man + ''; + + postInstall = (_drv.postInstall or "") + '' + mkdir -p $out/share/man/man1 + mv docs/_build/man/*.1 $out/share/man/man1/ + '' + + maybeWrap; + }); git-annex = with pkgs; if (!stdenv.isLinux) then |