brewery
notashelf /
8df203732eaad85d0b72c6eb18f958e73ce52d58

chroma

public

Lightweight wallpaper daemon for Wayland

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