Merge pull request #247114 from donovanglover/swww

swww: add shell completions and man pages

authored by

Weijia Wang and committed by
GitHub
af9f7bbf 945ba843

+37 -4
+37 -4
pkgs/tools/wayland/swww/default.nix
··· 1 - { lib, fetchFromGitHub, rustPlatform, pkg-config, lz4, libxkbcommon }: 1 + { lib 2 + , fetchFromGitHub 3 + , rustPlatform 4 + , pkg-config 5 + , lz4 6 + , libxkbcommon 7 + , installShellFiles 8 + , scdoc 9 + }: 10 + 2 11 rustPlatform.buildRustPackage rec { 3 12 pname = "swww"; 4 13 version = "0.8.1"; ··· 11 20 }; 12 21 13 22 cargoSha256 = "sha256-AE9bQtW5r1cjIsXA7YEP8TR94wBjaM7emOroVFq9ldE="; 14 - buildInputs = [ lz4 libxkbcommon ]; 23 + 24 + buildInputs = [ 25 + lz4 26 + libxkbcommon 27 + ]; 28 + 15 29 doCheck = false; # Integration tests do not work in sandbox environment 16 - nativeBuildInputs = [ pkg-config ]; 30 + 31 + nativeBuildInputs = [ 32 + pkg-config 33 + installShellFiles 34 + scdoc 35 + ]; 36 + 37 + postInstall = '' 38 + for f in doc/*.scd; do 39 + local page="doc/$(basename "$f" .scd)" 40 + scdoc < "$f" > "$page" 41 + installManPage "$page" 42 + done 43 + 44 + installShellCompletion --cmd swww \ 45 + --bash <(cat completions/swww.bash) \ 46 + --fish <(cat completions/swww.fish) \ 47 + --zsh <(cat completions/_swww) 48 + ''; 17 49 18 50 meta = with lib; { 19 51 description = "Efficient animated wallpaper daemon for wayland, controlled at runtime"; 20 52 homepage = "https://github.com/Horus645/swww"; 21 53 license = licenses.gpl3; 22 - maintainers = with maintainers; [ mateodd25 ]; 54 + maintainers = with maintainers; [ mateodd25 donovanglover ]; 23 55 platforms = platforms.linux; 56 + mainProgram = "swww"; 24 57 }; 25 58 }