summary refs log tree commit diff
path: root/fleet/pkgs/public-inbox-init-lite/default.nix
blob: 8704ea303901480626b6681d0337e9d6d3615a71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 ]}
''