Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I4643ed2c8e6f8ceb5e722612cc67a74e6a6a6964
76 lines
1.3 KiB
Nix
76 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
wayland,
|
|
wayland-protocols,
|
|
wayland-scanner,
|
|
libxkbcommon,
|
|
libGL,
|
|
mesa,
|
|
glibc,
|
|
pkg-config,
|
|
}: let
|
|
fs = lib.fileset;
|
|
s = ../.;
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "chroma";
|
|
version = "1.0.1";
|
|
|
|
src = fs.toSource {
|
|
root = s;
|
|
fileset = fs.unions [
|
|
(s + /include)
|
|
(s + /protocols)
|
|
(s + /src)
|
|
(s + /Makefile)
|
|
|
|
# For testing
|
|
(s + /lib)
|
|
(s + /tests)
|
|
];
|
|
};
|
|
|
|
buildInputs = [
|
|
# Wayland libraries
|
|
wayland.dev
|
|
wayland-protocols
|
|
wayland-scanner
|
|
libxkbcommon
|
|
|
|
# EGL/OpenGL libraries
|
|
libGL
|
|
mesa
|
|
|
|
# System libraries
|
|
glibc.dev
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"SYSTEMD_DIR=$(out)/lib/systemd/system" # FIXME: this is an user service, actually
|
|
];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
make test
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
postInstall = ''
|
|
install -Dm755 ${../chroma.conf.sample} $out/share/chroma.conf.sample
|
|
'';
|
|
|
|
meta = {
|
|
description = "Super-fast, lightweight and efficient wallpaper daemon for Wayland compositors";
|
|
license = lib.licenses.mpl20;
|
|
mainProgram = "chroma";
|
|
maintainers = with lib.maitainers; [NotAShelf];
|
|
};
|
|
}
|