nix: add packaging; update devshell
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9f1ddf6dbd141b5a85b4b5a36c2c9a586a6a6964
This commit is contained in:
parent
7ccb21af79
commit
d402e6e300
4 changed files with 83 additions and 10 deletions
65
nix/package.nix
Normal file
65
nix/package.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
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.0";
|
||||
|
||||
src = fs.toSource {
|
||||
root = s;
|
||||
fileset = fs.unions [
|
||||
(s + /include)
|
||||
(s + /protocols)
|
||||
(s + /src)
|
||||
|
||||
(s + /Makefile)
|
||||
];
|
||||
};
|
||||
|
||||
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"
|
||||
];
|
||||
|
||||
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];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue