summaryrefslogtreecommitdiff
path: root/nix/package/nixtamal.nix
diff options
context:
space:
mode:
author·𐑑𐑴𐑕𐑑𐑩𐑀2025-12-10 13:00:26 +0000
committer·𐑑𐑴𐑕𐑑𐑩𐑀2025-12-10 13:00:26 +0000
commit254b567412a50576d95f5b7c99ce128991e76357 (patch)
treec5642012ef75cf204308d869a94d701349a86031 /nix/package/nixtamal.nix
parentbcb2ef2eb63031df54e4916b11063b1f22a57a84 (diff)
downloadnixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar.gz
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar.bz2
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar.lz
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar.xz
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.tar.zst
nixtaml-254b567412a50576d95f5b7c99ce128991e76357.zip
nix onset
Diffstat (limited to 'nix/package/nixtamal.nix')
-rw-r--r--nix/package/nixtamal.nix95
1 files changed, 95 insertions, 0 deletions
diff --git a/nix/package/nixtamal.nix b/nix/package/nixtamal.nix
new file mode 100644
index 0000000..40806e2
--- /dev/null
+++ b/nix/package/nixtamal.nix
@@ -0,0 +1,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";
+ };
+}