wl-clipboard-rs: add man pages and shell completions
This commit is contained in:
parent
2c4fbc0313
commit
e01c3b9ff3
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, pkg-config
|
||||
, wayland
|
||||
, withNativeLibs ? false
|
||||
@ -26,11 +27,15 @@ rustPlatform.buildRustPackage rec {
|
||||
"--features=native_lib"
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals withNativeLibs [
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
] ++ lib.optionals withNativeLibs [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals withNativeLibs [
|
||||
buildInputs = [
|
||||
installShellFiles
|
||||
]++ lib.optionals withNativeLibs [
|
||||
wayland
|
||||
];
|
||||
|
||||
@ -47,6 +52,21 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=tests::copy::copy_test"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installManPage target/man/wl-copy.1
|
||||
installManPage target/man/wl-paste.1
|
||||
|
||||
installShellCompletion --cmd wl-copy \
|
||||
--bash target/completions/wl-copy.bash \
|
||||
--fish target/completions/wl-copy.fish \
|
||||
--zsh target/completions/_wl-copy
|
||||
|
||||
installShellCompletion --cmd wl-paste \
|
||||
--bash target/completions/wl-paste.bash \
|
||||
--fish target/completions/wl-paste.fish \
|
||||
--zsh target/completions/_wl-paste
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line copy/paste utilities for Wayland, written in Rust";
|
||||
homepage = "https://github.com/YaLTeR/wl-clipboard-rs";
|
||||
|
Loading…
Reference in New Issue
Block a user