brewery
notashelf /
a838f8673118a493c9618804f424df1a682cd147

chroma

public

Lightweight wallpaper daemon for Wayland

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/chroma.git
nix/package.nixNix70 lines1.2 KB
1
{
2
  lib,
3
  stdenv,
4
  wayland,
5
  wayland-protocols,
6
  wayland-scanner,
7
  libxkbcommon,
8
  glibc,
9
  pkg-config,
10
}: let
11
  fs = lib.fileset;
12
  s = ../.;
13
in
14
  stdenv.mkDerivation {
15
    pname = "chroma";
16
    version = "2.0.0";
17
18
    src = fs.toSource {
19
      root = s;
20
      fileset = fs.unions [
21
        (s + /include)
22
        (s + /protocols)
23
        (s + /src)
24
        (s + /Makefile)
25
26
        # For testing
27
        (s + /lib)
28
        (s + /tests)
29
      ];
30
    };
31
32
    buildInputs = [
33
      # Wayland libraries
34
      wayland.dev
35
      wayland-protocols
36
      wayland-scanner
37
      libxkbcommon
38
39
      # System libraries
40
      glibc.dev
41
    ];
42
43
    nativeBuildInputs = [
44
      pkg-config
45
    ];
46
47
    makeFlags = [
48
      "PREFIX=$(out)"
49
      "SYSTEMD_DIR=$(out)/lib/systemd/system" # FIXME: this is an user service, actually
50
    ];
51
52
    checkPhase = ''
53
      runHook preCheck
54
55
      make test
56
57
      runHook postCheck
58
    '';
59
60
    postInstall = ''
61
      install -Dm755 ${../chroma.toml.sample} $out/share/chroma.toml.sample
62
    '';
63
64
    meta = {
65
      description = "Super-fast, lightweight and efficient wallpaper daemon for Wayland compositors";
66
      license = lib.licenses.mpl20;
67
      mainProgram = "chroma";
68
      maintainers = with lib.maitainers; [NotAShelf];
69
    };
70
  }