From 4d100741815950891775083d36a2f08d8da3b500 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 31 Jan 2026 15:22:09 +0300 Subject: [PATCH] nix: streamline packaging Signed-off-by: NotAShelf Change-Id: I4643ed2c8e6f8ceb5e722612cc67a74e6a6a6964 --- nix/package.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nix/package.nix b/nix/package.nix index 10d2387..497f106 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -15,7 +15,7 @@ in stdenv.mkDerivation { pname = "chroma"; - version = "1.0.0"; + version = "1.0.1"; src = fs.toSource { root = s; @@ -23,8 +23,11 @@ in (s + /include) (s + /protocols) (s + /src) - (s + /Makefile) + + # For testing + (s + /lib) + (s + /tests) ]; }; @@ -49,9 +52,17 @@ in makeFlags = [ "PREFIX=$(out)" - "SYSTEMD_DIR=$(out)/lib/systemd/system" + "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 '';