summary refs log tree commit diff
path: root/fleet/pkgs/public-inbox-init-lite/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'fleet/pkgs/public-inbox-init-lite/default.nix')
-rw-r--r--fleet/pkgs/public-inbox-init-lite/default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/fleet/pkgs/public-inbox-init-lite/default.nix b/fleet/pkgs/public-inbox-init-lite/default.nix
new file mode 100644
index 0000000..8704ea3
--- /dev/null
+++ b/fleet/pkgs/public-inbox-init-lite/default.nix
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: V <v@unfathomable.blue>
+# SPDX-License-Identifier: OSL-3.0
+
+{ lib, substituteAll, public-inbox, runCommand, makeWrapper, git, xapian }:
+
+let
+  perl = public-inbox.fullperl.withPackages
+    (ps: with ps; [ public-inbox URI DBDSQLite SearchXapian ]);
+
+  subbed = substituteAll {
+    src = ./public-inbox-init-lite;
+    isExecutable = true;
+    inherit (perl) interpreter;
+  };
+in runCommand "public-inbox-init-lite" { nativeBuildInputs = [ makeWrapper ]; } ''
+  makeWrapper ${subbed} $out/bin/public-inbox-init-lite \
+    --prefix PATH : ${lib.makeBinPath [ git xapian ]}
+''