From acdb21f94d642417bef845041122a168ff64c4a5 Mon Sep 17 00:00:00 2001 From: ยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค Date: Wed, 10 Dec 2025 13:00:27 +0000 Subject: add banners! โ›ง --- README.rst | 7 +++++++ lib/banner.ml | 7 +++++++ lib/lock_loader.ml | 5 +++-- lib/manifest.ml | 7 +++++++ lib/nixtamal.ml | 1 + nix/tamal/default.nix | 4 +++- nix/tamal/manifest.kdl | 3 +++ 7 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 lib/banner.ml diff --git a/README.rst b/README.rst index 0485378..c3b990a 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,7 @@ +.. + โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป + โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ + โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› ================================================================================ Nixtamal ================================================================================ @@ -75,6 +79,9 @@ Set up .. code:: console $ nixtamal set-up + โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป + โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ + โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› Creating Nixtamal directory @ ./nix/tamal Writing new Nixtamal EditorConfig @ ./nix/tamal/.editorconfig โ€ฆ Fetching latest value for ใ€Œnixpkgsใ€ โ€ฆ diff --git a/lib/banner.ml b/lib/banner.ml new file mode 100644 index 0000000..6168b10 --- /dev/null +++ b/lib/banner.ml @@ -0,0 +1,7 @@ +(*โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ SPDX-FileCopyrightText: 2025 toastal โ”‚ +โ”‚ SPDX-License-Identifier: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€*) +let pp ppf = Fmt.pf ppf {|โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป@.โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ@.โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”›|} + +let show = Fmt.str "%t" pp diff --git a/lib/lock_loader.ml b/lib/lock_loader.ml index 98e86e3..6dcb233 100644 --- a/lib/lock_loader.ml +++ b/lib/lock_loader.ml @@ -82,8 +82,9 @@ let pp_banner (ppf : Format.formatter) = pf ppf "PERFORMANCE@ OF@ THIS@ SOFTWARE.@]@."; pf ppf "@."; pf ppf "%a@." Fmt.string hr; - pf ppf "@[This file was generated by Nixtamal.@;"; - pf ppf "Do not edit as it will be overwritten.@]@."; + pf ppf "โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป@."; + pf ppf "โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ This file was generated by Nixtamal.@."; + pf ppf "โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› Do not edit as it will be overwritten.@."; pf ppf "%a@." Fmt.string hr; pf ppf "*/@." diff --git a/lib/manifest.ml b/lib/manifest.ml index 2583e74..b79ebb9 100644 --- a/lib/manifest.ml +++ b/lib/manifest.ml @@ -711,6 +711,13 @@ let write () : (unit, error) result = Logs.app (fun m -> m "Writing manifest @@ %s โ€ฆ" filename); let result = Eio.Path.with_open_out ~create: (`Exclusive 0o644) filepath @@ fun flow -> + let banner = [ + Cstruct.of_string "// โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป\n"; + Cstruct.of_string "// โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ Read the manpage:\n"; + Cstruct.of_string "// โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› $ man nixtamal-manifest\n"; + ] + in + Eio.Flow.write flow banner; Util.KDL.to_flow flow mnfst; Eio.Flow.write flow ([Cstruct.of_string "\n"]) in diff --git a/lib/nixtamal.ml b/lib/nixtamal.ml index bb865f6..e45d906 100644 --- a/lib/nixtamal.ml +++ b/lib/nixtamal.ml @@ -91,6 +91,7 @@ let set_up ~env ?nixpkgs: nixpkgs_opt () : (unit, error) result = let (let*) = Result.bind in Eio.Switch.run @@ fun sw -> let proc_mgr = Eio.Stdenv.process_mgr env in + Logs.app (fun m -> m "%t@." Banner.pp); Working_directory.set_up_root (); if Manifest.exists () then begin diff --git a/nix/tamal/default.nix b/nix/tamal/default.nix index dcebfbd..95a95f7 100644 --- a/nix/tamal/default.nix +++ b/nix/tamal/default.nix @@ -15,7 +15,9 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ -This file was generated by Nixtamal. Do not edit as it will be overwritten. +โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป +โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ This file was generated by Nixtamal. +โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› Do not edit as it will be overwritten. โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */ { diff --git a/nix/tamal/manifest.kdl b/nix/tamal/manifest.kdl index 236392a..6dfe609 100644 --- a/nix/tamal/manifest.kdl +++ b/nix/tamal/manifest.kdl @@ -1,3 +1,6 @@ +// โ”โ”“โ•ป+โ•ป โ•ฑโ”โ”ณโ”“โ”โ”“โ”โ”ณโ”“โ”โ”“โ•ป +// โ”ƒโ”ƒโ”ƒโ”ƒโ”—โ”โ”“โ•นโ”ƒโ•นโ”ฃโ”ซโ”ƒโ”ƒโ”ƒโ”ฃโ”ซโ”ƒ Read the manpage: +// โ•นโ”—โ”›โ•นโ•ฑ โ•น โ•น โ•นโ•นโ•น โ•นโ•นโ•นโ”—โ”› $ man nixtamal-manifest version "0.1.0" inputs { nixpkgs { -- cgit v1.2.3