1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoconf,
6 automake,
7 sqlite,
8}:
9stdenv.mkDerivation (finalAttrs: {
10 pname = "opensmtpd-table-sqlite";
11 version = "1.0.1";
12
13 src = fetchFromGitHub {
14 owner = "OpenSMTPD";
15 repo = "table-sqlite";
16 tag = finalAttrs.version;
17 hash = "sha256-Y5AveTo+Ol6cMcxOW3/GMZZD+17HiQdQ4Vg5WHPjKgA=";
18 };
19
20 strictDeps = true;
21
22 buildInputs = [
23 sqlite
24 ];
25
26 nativeBuildInputs = [
27 autoconf
28 automake
29 ];
30
31 configureFlags = [
32 "--sysconfdir=/etc"
33 "--localstatedir=/var"
34 "--with-path-socket=/run"
35 "--with-path-pidfile=/run"
36 ];
37
38 preConfigure = ''
39 sh bootstrap
40 '';
41
42 meta = {
43 homepage = "https://www.opensmtpd.org/";
44 description = "SQLite tables for the OpenSMTPD mail server";
45 changelog = "https://github.com/OpenSMTPD/table-sqlite/releases/tag/${finalAttrs.version}";
46 license = lib.licenses.isc;
47 platforms = lib.platforms.linux;
48 maintainers = with lib.maintainers; [
49 pks
50 ];
51 };
52})