ok/jj
1
0
Fork 0
forked from mirrors/jj

nix: add manpages, completion to output

This commit is contained in:
Cole Mickens 2022-03-02 00:15:48 -08:00 committed by Martin von Zweigbergk
parent 8cdfc81cc2
commit 2a6ab8b6fc

View file

@ -31,6 +31,7 @@
, Security
, SystemConfiguration
, libiconv
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
@ -42,13 +43,27 @@
cargoLock = {
lockFile = "${self}/Cargo.lock";
};
nativeBuildInputs = [ pkgconfig gzip makeWrapper ];
nativeBuildInputs = [
pkgconfig gzip makeWrapper
installShellFiles
];
buildInputs = [ openssl dbus sqlite ]
++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
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
'';
}
)