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