-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathbuild.nix
53 lines (45 loc) · 1.06 KB
/
build.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
lib,
rustPlatform,
pkg-config,
lz4,
libxkbcommon,
installShellFiles,
scdoc,
nix-gitignore,
}: let
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version;
src = nix-gitignore.gitignoreSource [] ./.;
in
rustPlatform.buildRustPackage {
pname = "swww";
inherit src version;
cargoLock.lockFile = ./Cargo.lock;
buildInputs = [
lz4
libxkbcommon
];
doCheck = false; # Integration tests do not work in sandbox environment
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 completions/swww.bash \
--fish completions/swww.fish \
--zsh completions/_swww
'';
meta = {
description = "Efficient animated wallpaper daemon for wayland, controlled at runtime";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
mainProgram = "swww";
};
}