mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 18:27:38 +00:00
nix: add manpages, completion to output
This commit is contained in:
parent
8cdfc81cc2
commit
2a6ab8b6fc
1 changed files with 16 additions and 1 deletions
17
flake.nix
17
flake.nix
|
@ -31,6 +31,7 @@
|
||||||
, Security
|
, Security
|
||||||
, SystemConfiguration
|
, SystemConfiguration
|
||||||
, libiconv
|
, libiconv
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -42,13 +43,27 @@
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = "${self}/Cargo.lock";
|
lockFile = "${self}/Cargo.lock";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ pkgconfig gzip makeWrapper ];
|
nativeBuildInputs = [
|
||||||
|
pkgconfig gzip makeWrapper
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
buildInputs = [ openssl dbus sqlite ]
|
buildInputs = [ openssl dbus sqlite ]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.isDarwin [
|
||||||
Security
|
Security
|
||||||
SystemConfiguration
|
SystemConfiguration
|
||||||
libiconv
|
libiconv
|
||||||
];
|
];
|
||||||
|
postInstall = ''
|
||||||
|
$out/bin/jj debug mangen > ./jj.1
|
||||||
|
installManPage ./jj.1
|
||||||
|
|
||||||
|
$out/bin/jj debug completion --bash > ./completions.bash
|
||||||
|
installShellCompletion --bash --name ${pname}.bash ./completions.bash
|
||||||
|
$out/bin/jj debug completion --fish > ./completions.fish
|
||||||
|
installShellCompletion --fish --name ${pname}.fish ./completions.fish
|
||||||
|
$out/bin/jj debug completion --zsh > ./completions.zsh
|
||||||
|
installShellCompletion --zsh --name _${pname} ./completions.zsh
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue