Nix add man (#1148)
* update(nix): add manpage to `man` output * fmt(nix): nixpkgs-fmt
This commit is contained in:
parent
04ce772673
commit
4132b747ca
1 changed files with 89 additions and 84 deletions
13
flake.nix
13
flake.nix
|
|
@ -19,7 +19,8 @@
|
||||||
"i686-linux"
|
"i686-linux"
|
||||||
"x86_64-darwin"
|
"x86_64-darwin"
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
] (system:
|
]
|
||||||
|
(system:
|
||||||
let
|
let
|
||||||
overlays = [ (import rust-overlay) ];
|
overlays = [ (import rust-overlay) ];
|
||||||
|
|
||||||
|
|
@ -50,6 +51,9 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
# generates manpages
|
||||||
|
pkgs.mandown
|
||||||
|
|
||||||
pkgs.installShellFiles
|
pkgs.installShellFiles
|
||||||
pkgs.copyDesktopItems
|
pkgs.copyDesktopItems
|
||||||
|
|
||||||
|
|
@ -61,13 +65,12 @@
|
||||||
pkgs.cargo-make
|
pkgs.cargo-make
|
||||||
pkgs.rust-analyzer
|
pkgs.rust-analyzer
|
||||||
pkgs.nixpkgs-fmt
|
pkgs.nixpkgs-fmt
|
||||||
# generates manpages
|
|
||||||
pkgs.mandown
|
|
||||||
# optimizes wasm binaries
|
# optimizes wasm binaries
|
||||||
pkgs.binaryen
|
pkgs.binaryen
|
||||||
];
|
];
|
||||||
|
|
||||||
in rec {
|
in
|
||||||
|
rec {
|
||||||
|
|
||||||
packages.zellij =
|
packages.zellij =
|
||||||
(pkgs.makeRustPlatform { inherit cargo rustc; }).buildRustPackage {
|
(pkgs.makeRustPlatform { inherit cargo rustc; }).buildRustPackage {
|
||||||
|
|
@ -78,6 +81,8 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
mandown ./docs/MANPAGE.md > ./zellij.1
|
||||||
|
installManPage ./zellij.1
|
||||||
|
|
||||||
# explicit behavior
|
# explicit behavior
|
||||||
$out/bin/zellij setup --generate-completion bash > ./completions.bash
|
$out/bin/zellij setup --generate-completion bash > ./completions.bash
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue