jetbrains: useFetchCargoVendor (#377020)
[NixPkgs.git] / pkgs / by-name / sw / swww / package.nix
blobe2a07e705fc011ef7ba2a1db499098c641cc3120
2   lib,
3   fetchFromGitHub,
4   rustPlatform,
5   pkg-config,
6   lz4,
7   libxkbcommon,
8   installShellFiles,
9   scdoc,
12 rustPlatform.buildRustPackage rec {
13   pname = "swww";
14   version = "0.9.5";
16   src = fetchFromGitHub {
17     owner = "LGFae";
18     repo = "swww";
19     tag = "v${version}";
20     hash = "sha256-ldy9HhIsWdtTdvtRLV3qDT80oX646BI4Q+YX5wJXbsc=";
21   };
23   cargoLock = {
24     lockFile = ./Cargo.lock;
25     outputHashes = {
26       "bitcode-0.6.0" = "sha256-D1Jv9k9m6m7dXjU8s4YMEMC39FOUN7Ix9SvLKhM1yh0=";
27     };
28   };
30   buildInputs = [
31     lz4
32     libxkbcommon
33   ];
35   doCheck = false; # Integration tests do not work in sandbox environment
37   nativeBuildInputs = [
38     pkg-config
39     installShellFiles
40     scdoc
41   ];
43   postInstall = ''
44     for f in doc/*.scd; do
45       local page="doc/$(basename "$f" .scd)"
46       scdoc < "$f" > "$page"
47       installManPage "$page"
48     done
50     installShellCompletion --cmd swww \
51       --bash completions/swww.bash \
52       --fish completions/swww.fish \
53       --zsh completions/_swww
54   '';
56   meta = {
57     description = "Efficient animated wallpaper daemon for wayland, controlled at runtime";
58     homepage = "https://github.com/LGFae/swww";
59     license = lib.licenses.gpl3;
60     maintainers = with lib.maintainers; [
61       mateodd25
62       donovanglover
63     ];
64     platforms = lib.platforms.linux;
65     mainProgram = "swww";
66   };