diff options
author | Donovan Glover <donovan@dglover.co> | 2023-08-04 08:12:00 -0400 |
---|---|---|
committer | Donovan Glover <donovan@dglover.co> | 2023-08-04 09:03:48 -0400 |
commit | cf49c29935855481150594cf629b65ecde1a15ba (patch) | |
tree | b831ca86f87d606d3e07df3688f9dc37a7c9ad30 /pkgs/tools/wayland | |
parent | 37f8d83e9e45ab94c96742ef9d0960f5039d8807 (diff) | |
download | nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar.gz nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar.bz2 nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar.lz nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar.xz nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.tar.zst nixpkgs-cf49c29935855481150594cf629b65ecde1a15ba.zip |
swww: add shell completions and man pages
Diffstat (limited to 'pkgs/tools/wayland')
-rw-r--r-- | pkgs/tools/wayland/swww/default.nix | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/pkgs/tools/wayland/swww/default.nix b/pkgs/tools/wayland/swww/default.nix index 3555af7c042..d97c8ea28df 100644 --- a/pkgs/tools/wayland/swww/default.nix +++ b/pkgs/tools/wayland/swww/default.nix @@ -1,4 +1,13 @@ -{ lib, fetchFromGitHub, rustPlatform, pkg-config, lz4, libxkbcommon }: +{ lib +, fetchFromGitHub +, rustPlatform +, pkg-config +, lz4 +, libxkbcommon +, installShellFiles +, scdoc +}: + rustPlatform.buildRustPackage rec { pname = "swww"; version = "0.8.1"; @@ -11,15 +20,39 @@ rustPlatform.buildRustPackage rec { }; cargoSha256 = "sha256-AE9bQtW5r1cjIsXA7YEP8TR94wBjaM7emOroVFq9ldE="; - buildInputs = [ lz4 libxkbcommon ]; + + buildInputs = [ + lz4 + libxkbcommon + ]; + doCheck = false; # Integration tests do not work in sandbox environment - nativeBuildInputs = [ pkg-config ]; + + nativeBuildInputs = [ + pkg-config + installShellFiles + scdoc + ]; + + postInstall = '' + for f in doc/*.scd; do + local page="doc/$(basename "$f" .scd)" + scdoc < "$f" > "$page" + installManPage "$page" + done + + installShellCompletion --cmd swww \ + --bash <(cat completions/swww.bash) \ + --fish <(cat completions/swww.fish) \ + --zsh <(cat completions/_swww) + ''; meta = with lib; { description = "Efficient animated wallpaper daemon for wayland, controlled at runtime"; homepage = "https://github.com/Horus645/swww"; license = licenses.gpl3; - maintainers = with maintainers; [ mateodd25 ]; + maintainers = with maintainers; [ mateodd25 donovanglover ]; platforms = platforms.linux; + mainProgram = "swww"; }; } |