From 1765226658fcc04478c07714930c163a20df737f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Tue, 27 Jan 2026 13:58:34 +0700 Subject: [PATCH] nixtamal: init at 0.1.1-beta --- pkgs/by-name/ni/nixtamal/package.nix | 106 +++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 pkgs/by-name/ni/nixtamal/package.nix diff --git a/pkgs/by-name/ni/nixtamal/package.nix b/pkgs/by-name/ni/nixtamal/package.nix new file mode 100644 index 000000000000..b09b8969a834 --- /dev/null +++ b/pkgs/by-name/ni/nixtamal/package.nix @@ -0,0 +1,106 @@ +{ + lib, + fetchdarcs, + python3Packages, + ocamlPackages, + makeBinaryWrapper, + coreutils, + nix-prefetch-darcs, + nix-prefetch-git, + nix-prefetch-pijul, + testers, + nixtamal, +}: + +ocamlPackages.buildDunePackage (finalAttrs: { + pname = "nixtamal"; + version = "0.1.1-beta"; + release_year = 2026; + + minimalOCamlVersion = "5.3"; + + src = fetchdarcs { + url = "https://darcs.toastal.in.th/nixtamal/stable/"; + mirrors = [ "https://smeder.ee/~toastal/nixtamal.darcs" ]; + rev = finalAttrs.version; + hash = "sha256-8HrW7VH2LAcTyduGfToC3+oqU7apILdvgd76c8r8NIw="; + }; + + nativeBuildInputs = [ + makeBinaryWrapper + # For manpages + python3Packages.docutils + python3Packages.pygments + ]; + + buildInputs = with ocamlPackages; [ + camomile + cmdliner + eio + eio_main + fmt + jingoo + (jsont.override { + withBrr = false; + withBytesrw = true; + }) + kdl + logs + ppx_deriving + ppx_deriving_qcheck + saturn + stdint + uri + ]; + + checkInputs = with ocamlPackages; [ + alcotest + qcheck + qcheck-alcotest + ]; + + postPatch = '' + substituteInPlace bin/main.ml --subst-var version + substituteInPlace lib/lock_loader.ml --subst-var release_year + ''; + + doCheck = true; + + postInstall = '' + wrapProgram "$out/bin/nixtamal" --prefix PATH : ${ + lib.makeBinPath [ + coreutils + nix-prefetch-darcs + nix-prefetch-git + nix-prefetch-pijul + ] + } + ''; + + passthru.tests.version = testers.testVersion { + package = nixtamal; + command = "${nixtamal.meta.mainProgram} --version"; + }; + + meta = { + license = with lib.licenses; [ gpl3Plus ]; + platforms = lib.platforms.unix; + mainProgram = "nixtamal"; + homepage = "https://nixtamal.toast.al"; + changelog = "https://nixtamal.toast.al/changelog/"; + description = "Fulfilling, pure input pinning for Nix"; + longDescription = '' + Nixtamal’s keys features + + • Automate the manual work of input pinning, allowing to lock & refresh inputs + • Declaritive KDL manifest file over imperative CLI flags + • Host, forge, VCS-agnostic + • Fetchers from Nixpkgs not supported by the builtins (currently Darcs, Pijul) + • Supports mirrors + • Override hash algorithm on a per-project & per-input basis — including BLAKE3 support + • Custom freshness commands + • No experimental Nix features required + ''; + maintainers = with lib.maintainers; [ toastal ]; + }; +})