From 3b9858516a849f2cfd096b93c973c220c40fcf19 Mon Sep 17 00:00:00 2001 From: ·𐑑𐑴𐑕𐑑𐑩𐑀 Date: Sat, 20 Dec 2025 19:34:15 +0000 Subject: Better project setup stuff --- README.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/README.rst b/README.rst index 58e28d2..76d438f 100644 --- a/README.rst +++ b/README.rst @@ -152,14 +152,81 @@ As they say: read the manpages Building / hacking =============================================================================== +Working setup +------------------------------------------------------------------------------- + +If you don’t have Darcs install, you can use from Nixpkgs such as + .. code:: console $ nix-shell -p darcs + +After/else + +.. code:: console + $ darcs clone https://darcs.toastal.in.th/nixtamal/trunk/ nixtamal $ darcs setpref boringfile .boring $ cd nixtamal + +Development environment setup +------------------------------------------------------------------------------- + +Base Nix shell + +.. code:: console + + $ nix-shell + +Or with Direnv + +.. code:: console + + $ echo "use nix" >> .envrc + $ direnv allow + +Building with Dune +------------------------------------------------------------------------------- + +.. code:: console + + $ dune build + +Building with Nix +------------------------------------------------------------------------------- + +Basic + +.. code:: console + $ nix-build +Everything else + +.. code:: console + + $ nix-build release.nix + $ nix-build release.nix -A nixtamal + +Darcs hooks (can skip) +------------------------------------------------------------------------------- + +.. code:: console + + $ chmod +x script/mk-darcs-weak-hash + $ $EDITOR _darcs/prefs/defaults + +.. code:: + + apply posthook script/mk-darcs-weak-hash && nix-build --no-out-link release.nix + obliterate posthook script/mk-darcs-weak-hash + record posthook script/mk-darcs-weak-hash + +Hooks here can: + β€’ Build the entire project before applying patches to make sure it works. + β€’ Show the WeakHash ``_darcs/weak_hash`` which is good for querying project + state, such as for ``latest-cmd``s (hint, hink). + License =============================================================================== -- cgit v1.2.3