blob: 773b226316aeefd276faaf7b18573e5d3d15be23 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
lib,
stdenv,
scdoc,
hare,
hareHook,
}:
stdenv.mkDerivation {
pname = "haredoc";
outputs = [
"out"
"man"
];
inherit (hare) version src;
nativeBuildInputs = [
scdoc
hareHook
];
strictDeps = true;
enableParallelBuilding = true;
buildPhase = ''
runHook preBuild
hare build -o haredoc ./cmd/haredoc
scdoc <docs/haredoc.1.scd >haredoc.1
scdoc <docs/haredoc.5.scd >haredoc.5
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm0755 ./haredoc $out/bin/haredoc
install -Dm0644 ./haredoc.1 $out/share/man/man1/haredoc.1
install -Dm0644 ./haredoc.5 $out/share/man/man5/haredoc.5
runHook postInstall
'';
meta = {
homepage = "https://harelang.org/";
description = "Hare's documentation tool";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onemoresuza ];
mainProgram = "haredoc";
inherit (hareHook.meta) platforms badPlatforms;
};
}
|