2023-08-04 12:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, lz4
|
|
|
|
, libxkbcommon
|
|
|
|
, installShellFiles
|
|
|
|
, scdoc
|
|
|
|
}:
|
|
|
|
|
2022-11-22 02:03:42 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "swww";
|
2023-07-16 19:48:50 +00:00
|
|
|
version = "0.8.1";
|
2022-11-22 02:03:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Horus645";
|
|
|
|
repo = pname;
|
2023-02-04 16:02:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-16 19:48:50 +00:00
|
|
|
hash = "sha256-9c/qBmk//NpfvPYjK2QscubFneiQYBU/7PLtTvVRmTA=";
|
2022-11-22 02:03:42 +00:00
|
|
|
};
|
2023-02-04 16:40:58 +00:00
|
|
|
|
2023-07-16 19:48:50 +00:00
|
|
|
cargoSha256 = "sha256-AE9bQtW5r1cjIsXA7YEP8TR94wBjaM7emOroVFq9ldE=";
|
2023-08-04 12:12:00 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
lz4
|
|
|
|
libxkbcommon
|
|
|
|
];
|
|
|
|
|
2023-02-19 04:22:24 +00:00
|
|
|
doCheck = false; # Integration tests do not work in sandbox environment
|
2023-08-04 12:12:00 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
'';
|
2023-02-04 16:40:58 +00:00
|
|
|
|
2022-11-22 02:03:42 +00:00
|
|
|
meta = with lib; {
|
2023-02-04 16:02:49 +00:00
|
|
|
description = "Efficient animated wallpaper daemon for wayland, controlled at runtime";
|
2022-11-22 02:03:42 +00:00
|
|
|
homepage = "https://github.com/Horus645/swww";
|
|
|
|
license = licenses.gpl3;
|
2023-08-04 12:12:00 +00:00
|
|
|
maintainers = with maintainers; [ mateodd25 donovanglover ];
|
2022-11-22 02:03:42 +00:00
|
|
|
platforms = platforms.linux;
|
2023-08-04 12:12:00 +00:00
|
|
|
mainProgram = "swww";
|
2022-11-22 02:03:42 +00:00
|
|
|
};
|
|
|
|
}
|