diff --git a/pkgs/by-name/wl/wl-clipboard-rs/package.nix b/pkgs/by-name/wl/wl-clipboard-rs/package.nix index 326774c3ca42..2483c485be06 100644 --- a/pkgs/by-name/wl/wl-clipboard-rs/package.nix +++ b/pkgs/by-name/wl/wl-clipboard-rs/package.nix @@ -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";