blob: 40806e27819d61bfc3b317ac29bf0982910e7515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#──────────────────────────────────────────────────────────────────────────────┐
# SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/> │
# SPDX-License-Identifier: LGPL-2.1-or-later │
#──────────────────────────────────────────────────────────────────────────────┘
{
lib,
coreutils,
python3Packages,
nix-prefetch-darcs,
nix-prefetch-git,
nix-prefetch-pijul,
ocamlPackages,
}:
ocamlPackages.buildDunePackage {
pname = "nixtamal";
version = "0.0.1-alpha.1";
src =
let
fs = lib.fileset;
ocaml_project =
file:
lib.lists.elem file.name [
"dune"
"dune-project"
"dune-workspace"
]
|| file.hasExt "opam";
ocaml_src =
file:
lib.lists.any file.hasExt [
"ml"
"mld"
"mli"
"mly"
];
in
fs.toSource {
root = ../..;
fileset = fs.unions [
../../LICENSE.txt
(fs.fileFilter (file: file.hasExt "txt") ../../license)
(fs.fileFilter ocaml_project ../..)
(fs.fileFilter ocaml_src ../../bin)
(fs.fileFilter ocaml_src ../../lib)
(fs.fileFilter ocaml_src ../../test)
];
};
nativeBuildInputs = [
python3Packages.docutils
# NOTE: no KDL support
python3Packages.pygments
];
buildInputs = [
# required since the prefetcher scripts presently don’t specify all of
# their inputs
coreutils
nix-prefetch-darcs
nix-prefetch-git
nix-prefetch-pijul
]
++ (with ocamlPackages; [
cmdliner
eio
eio_main
fmt
jingoo
(jsont.override {
withBrr = false;
withBytesrw = true;
})
kdl
logs
ppx_deriving
saturn
uri
]);
doCheck = false; # TODO
checkInputs = with ocamlPackages; [
alcotest
];
meta = {
license = with lib.licenses; [ gpl3Plus ];
platforms = lib.platforms.unix;
mainProgram = "nixtamal";
};
}
|