futhark: build and install manpages
This commit is contained in:
parent
f447e4cf6a
commit
88c70b16b5
@ -572,17 +572,34 @@ self: super: builtins.intersectAttrs super {
|
|||||||
# The test-suite requires a running PostgreSQL server.
|
# The test-suite requires a running PostgreSQL server.
|
||||||
Frames-beam = dontCheck super.Frames-beam;
|
Frames-beam = dontCheck super.Frames-beam;
|
||||||
|
|
||||||
futhark = if pkgs.stdenv.isDarwin then super.futhark else with pkgs;
|
# * Compile manpages (which are in RST and are compiled with Sphinx).
|
||||||
let path = stdenv.lib.makeBinPath [ gcc ];
|
#
|
||||||
in overrideCabal (addBuildTool super.futhark makeWrapper) (_drv: {
|
# * Wrap so that binary can find GCC and OpenCL headers (dubious if
|
||||||
postInstall = ''
|
# a good idea).
|
||||||
wrapProgram $out/bin/futhark \
|
futhark = with pkgs;
|
||||||
--prefix PATH : "${path}" \
|
let maybeWrap =
|
||||||
--set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \
|
if pkgs.stdenv.isDarwin then ""
|
||||||
--set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \
|
else
|
||||||
--set NIX_CFLAGS_LINK "-L${ocl-icd}/lib"
|
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;
|
git-annex = with pkgs;
|
||||||
if (!stdenv.isLinux) then
|
if (!stdenv.isLinux) then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user