-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.nix
52 lines (44 loc) · 1.28 KB
/
package.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
{
lib,
rustPlatform,
installShellFiles,
libheif,
}: let
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in
rustPlatform.buildRustPackage rec {
inherit (cargoToml.package) version;
pname = "timewall";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ./.)) (
lib.fileset.unions [
./src
./build.rs
./Cargo.toml
./Cargo.lock
]
);
};
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [installShellFiles];
buildInputs = [libheif];
SHELL_COMPLETIONS_DIR = "completions";
preBuild = ''
mkdir ${SHELL_COMPLETIONS_DIR}
'';
postInstall = ''
installShellCompletion \
--bash ${SHELL_COMPLETIONS_DIR}/timewall.bash \
--zsh ${SHELL_COMPLETIONS_DIR}/_timewall \
--fish ${SHELL_COMPLETIONS_DIR}/timewall.fish
'';
meta = {
description = "Apple dynamic HEIF wallpapers on GNU/Linux";
homepage = "https://github.com/bcyran/timewall";
changelog = "https://github.com/bcyran/timewall/releases/tag/${version}";
license = lib.licenses.mit;
mainProgram = "timewall";
maintainers = with lib.maintainers; [bcyran];
};
}