about summary refs log tree commit diff
path: root/kittybox.nix
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2025-04-10 05:07:31 +0300
committerVika <vika@fireburn.ru>2025-04-10 05:23:37 +0300
commit52747f4e7f1fd105cc521ccaa4fe5afe41f0b7cd (patch)
treecda493f919e84e0cbe01250ff412bdacafe94747 /kittybox.nix
parentae2480ae9887d258065b983edeb723272dde8312 (diff)
downloadkittybox-52747f4e7f1fd105cc521ccaa4fe5afe41f0b7cd.tar.zst
Add a hand-written man page
Change-Id: I575d88828533d184fea86b4282b6ce1e4e5f40cd
Diffstat (limited to 'kittybox.nix')
-rw-r--r--kittybox.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/kittybox.nix b/kittybox.nix
index b078c93..1b591f3 100644
--- a/kittybox.nix
+++ b/kittybox.nix
@@ -1,4 +1,4 @@
-{ crane, lib, nodePackages
+{ crane, lib, installShellFiles, nodePackages
 , useWebAuthn ? false, openssl, zlib, pkg-config, protobuf
 , usePostgres ? true, postgresql, postgresqlTestHook
 , nixosTests }:
@@ -9,7 +9,7 @@ assert usePostgres -> postgresql != null && postgresqlTestHook != null;
 let
   featureMatrix = features: lib.concatStringsSep " " (lib.attrNames (lib.filterAttrs (k: v: v) features));
 
-  suffixes = [ ".sql" ".ts" ".css" ".html" ".json" ".woff2" ];
+  suffixes = [ ".sql" ".ts" ".css" ".html" ".json" ".woff2" ".1" ];
   suffixFilter = suffixes: name: type:
       let base = baseNameOf (toString name);
       in type == "directory" || lib.any (ext: lib.hasSuffix ext base) suffixes;
@@ -34,7 +34,8 @@ let
     cargoExtraArgs = cargoFeatures;
 
     buildInputs = lib.optional useWebAuthn openssl;
-    nativeBuildInputs = [ nodePackages.typescript ] ++ (lib.optional useWebAuthn pkg-config);
+    nativeBuildInputs = [ nodePackages.typescript installShellFiles ]
+    ++ (lib.optional useWebAuthn pkg-config);
 
     meta = with lib.meta; {
       maintainers = with lib.maintainers; [ vikanezrimaya ];
@@ -50,13 +51,17 @@ in crane.buildPackage (args' // {
   nativeCheckInputs = lib.optionals usePostgres [
     postgresql postgresqlTestHook
   ];
-  
+
   # Tests create arbitrary databases; we need to be prepared for that
   postgresqlTestUserOptions = "LOGIN SUPERUSER";
   postgresqlTestSetupPost = ''
     export DATABASE_URL="postgres://localhost?host=$PGHOST&user=$PGUSER&dbname=$PGDATABASE"
   '';
 
+  postInstall = ''
+    installManPage ./kittybox.1
+  '';
+
   passthru = {
     tests = nixosTests;
     hasPostgres = usePostgres;