mirror of
https://github.com/justinwoo/easy-dhall-nix.git
synced 2024-12-23 02:09:44 +01:00
feat(build.nix): add man page for dhall & dhall-docs on MacOS
This commit is contained in:
parent
646a850fc1
commit
5e4e92105a
3 changed files with 15 additions and 1 deletions
12
build.nix
12
build.nix
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, release }:
|
||||
|
||||
{ simpleName, binNames, attrName }:
|
||||
{ simpleName, binNames, attrName, manPages ? [] }:
|
||||
|
||||
let
|
||||
release = import ./release.nix;
|
||||
|
@ -46,6 +46,16 @@ pkgs.stdenv.mkDerivation rec {
|
|||
|
||||
rmdir bin
|
||||
|
||||
${pkgs.lib.optionalString (manPages != []) ''
|
||||
${pkgs.lib.concatMapStringsSep "\n" (manPage: ''
|
||||
# TODO: split into $man output
|
||||
manPagePath="$out/share/man/man1/${manPage}"
|
||||
install -D -m644 -T "share/man/man1/${manPage}" "$manPagePath"
|
||||
rm "share/man/man1/${manPage}"
|
||||
'') manPages}
|
||||
rmdir --parent share/man/man1
|
||||
''}
|
||||
|
||||
# a bit hacky, but sourceRoot unfortunately unpacks to the runtime build dir
|
||||
rm env-vars .sandbox.sb || true
|
||||
|
||||
|
|
|
@ -4,4 +4,6 @@ import ./build.nix { inherit pkgs; release = import ./release.nix; } {
|
|||
simpleName = "dhall-docs-simple";
|
||||
binNames = [ "dhall-docs" ];
|
||||
attrName = "dhall-docs";
|
||||
# see https://github.com/dhall-lang/dhall-haskell/issues/2104
|
||||
manPages = if pkgs.stdenv.isDarwin then [ "dhall-docs.1" ] else [];
|
||||
}
|
||||
|
|
|
@ -4,4 +4,6 @@ import ./build.nix { inherit pkgs; release = import ./release.nix; } {
|
|||
simpleName = "dhall-simple";
|
||||
binNames = [ "dhall" ];
|
||||
attrName = "dhall";
|
||||
# see https://github.com/dhall-lang/dhall-haskell/issues/2104
|
||||
manPages = if pkgs.stdenv.isDarwin then [ "dhall.1" ] else [];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue