From Nix + Nixpkgs
If on NixOS unstable, you can run (but be wary of version):
$ nix-shell -p nixtamal
Since the merge isn’t propogated to a biannual NixOS release, this technically means if you have extra-experimental-features = nix-command flakes, you could try nix run github:NixOS/nixpkgs?ref=nixos-unstable#nixtamal for now.
Alternatively, if wanting to trial run one of the open pull requests or if the build is failing due to OCaml package changes, you can use nix-run https://github.com/toastal/nixpkgs/archive/refs/heads/nixtamal-${VERSION}.zip -A nixtamal (such as for 1.1.2 with Cmdliner 2.x compatibility: nix-run https://github.com/toastal/nixpkgs/archive/refs/heads/nixtamal-1.1.2.zip -A nixtamal).
Before you respond “see: flakes are great!”, it’s actually nix run from nix-command doing the “great” part here… it’s a shame we are tied to the flake input URI limitations + # from flakes packages for the best experience for now, but I have some ideas about how maybe --file could be wrapped & used here in the future… but also we now have nix-run to free us from many of the nix run limitations.
From source
If you don’t have Darcs installed, you can use from Nixpkgs such as
$ nix-shell -p darcs
After/else clone from one of the mirrors
$ darcs clone --lazy https://darcs.toastal.in.th/nixtamal/stable/ nixtamal $ darcs clone --lazy https://smeder.ee/~toastal/nixtamal.darcs nixtamal
Then change directory to the project & set up
$ cd nixtamal $ darcs setpref boringfile .boring
Now build!
$ nix-build $ result/bin/nixtamal --help
You can optionally install as Nix profile
$ nix profile add $(nix-build)
Add overlay
With access to nixtamal (even if from nixtamal/result/bin), you can now bootstrap yourself to add the overlay to a system
$ nixtamal set-up … $ nixtamal tweak
With the manifest.kdl open
inputs { nixtamal { darcs { repository "https://darcs.toastal.in.th/nixtamal/stable" mirrors "https://smeder.ee/~toastal/nixtamal.darcs" } fresh-cmd { $ curl -sL "https://darcs.toastal.in.th/nixtamal/stable/_darcs/weak_hash" } } }
Which can can now be used for adding the overlay
let # imports the lockfile thru default.nix shim inputs = import .nix/tamal { }; pkgs = import inputs.nixpkgs { overlays = [ # apply our Nixtamal overlay to Nixpkgs (import "${inputs.nixtamal}/nix/overlay") ]; }; in pkgs.nixtamal
For development & sending patches using pre-release @ next
$ darcs clone --lazy https://darcs.toastal.in.th/nixtamal/next nixtamal
Using pre-release in manifest.kdl
inputs { nixpkgs {// … } nixtamal { darcs { // next isn’t mirrored repository "https://darcs.toastal.in.th/nixtamal/next/" } fresh-cmd { $ curl -sL "https://darcs.toastal.in.th/nixtamal/next/_darcs/weak_hash" } } }