diff options
| author | Β·ππ΄πππ©π€ | 2025-12-20 18:46:00 +0000 |
|---|---|---|
| committer | Β·ππ΄πππ©π€ | 2025-12-20 18:46:00 +0000 |
| commit | 1ee0de69fff2a03e046eefeece1dfbce66f524f2 (patch) | |
| tree | 1d24ef663e7adbc3edf5505c60d6b88813f5126b | |
| parent | 9974d0ca602d650e34b94843934266f27bfba5db (diff) | |
| download | nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar.gz nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar.bz2 nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar.lz nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar.xz nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.tar.zst nixtaml-1ee0de69fff2a03e046eefeece1dfbce66f524f2.zip | |
newlines to fix tab indentation
I really need to just write to my own buffer if Format isnβt gonna
support tabs :|
| -rw-r--r-- | lib/lock_loader.ml | 20 | ||||
| -rw-r--r-- | nix/tamal/default.nix | 23 |
2 files changed, 21 insertions, 22 deletions
diff --git a/lib/lock_loader.ml b/lib/lock_loader.ml index 4b469d4..daad591 100644 --- a/lib/lock_loader.ml +++ b/lib/lock_loader.ml @@ -168,7 +168,7 @@ let pp_body ~version (ppf : Format.formatter) () = let builtin_fetch_ifs = Dynarray.create () in if Features.has Features.file feats then Dynarray.add_last builtin_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {| if k == 0 then|}; {| builtin-fetch-url {|}; {| inherit name;|}; @@ -179,7 +179,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.archive feats then Dynarray.add_last builtin_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 1 then|}; {| builtin-fetch-tarball {|}; {| inherit name;|}; @@ -190,7 +190,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.git feats then Dynarray.add_last builtin_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 2 then|}; {| builtin-fetch-git {|}; {| inherit name;|}; @@ -198,7 +198,7 @@ let pp_body ~version (ppf : Format.formatter) () = {| }|}; ] ); - pf ppf "@[%a@]@." (list ~sep: (any "@;else ") string) (Dynarray.to_list builtin_fetch_ifs); + pf ppf "@[%a@]@." (list ~sep: (any "@.else ") string) (Dynarray.to_list builtin_fetch_ifs); Dynarray.clear builtin_fetch_ifs; pf ppf {| else@.|}; pf ppf {| throw "Unsupported input kind β${builtins.toString k}β.";@.|}; @@ -317,7 +317,7 @@ let pp_body ~version (ppf : Format.formatter) () = let pkgs_fetch_ifs = Dynarray.create () in if Features.has Features.file feats then Dynarray.add_last pkgs_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 0 then|}; {| fetch-url {|}; {| inherit name;|}; @@ -328,7 +328,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.archive feats then Dynarray.add_last pkgs_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 1 then|}; {| fetch-zip {|}; {| inherit name;|}; @@ -339,7 +339,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.git feats then Dynarray.add_last pkgs_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 2 then|}; {| fetch-git {|}; {| inherit name;|}; @@ -350,7 +350,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.darcs feats then Dynarray.add_last pkgs_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 3 then|}; {| fetch-darcs {|}; {| inherit name;|}; @@ -361,7 +361,7 @@ let pp_body ~version (ppf : Format.formatter) () = ); if Features.has Features.pijul feats then Dynarray.add_last pkgs_fetch_ifs ( - Fmt.str "@[<v 1>%a@]" (list ~sep: cut string) [ + Fmt.str "@[<v 1>%a@]" (list ~sep: (any "@.") string) [ {|if k == 4 then|}; {| fetch-pijul {|}; {| inherit name;|}; @@ -370,7 +370,7 @@ let pp_body ~version (ppf : Format.formatter) () = {| }|}; ] ); - pf ppf "@[%a@]@." (list ~sep: (any "@;else ") string) (Dynarray.to_list pkgs_fetch_ifs); + pf ppf "@[%a@]@." (list ~sep: (any "@.else ") string) (Dynarray.to_list pkgs_fetch_ifs); Dynarray.clear pkgs_fetch_ifs; pf ppf {| else@.|}; pf ppf {| throw "Unsupported input kind β${builtins.toString k}β.";@.|}; diff --git a/nix/tamal/default.nix b/nix/tamal/default.nix index 95a95f7..a995c23 100644 --- a/nix/tamal/default.nix +++ b/nix/tamal/default.nix @@ -39,8 +39,7 @@ let let failed-urls' = [ url ] ++ failed-urls; in if builtins.length urls <= 0 then let fus = builtins.concatStringsSep " " failed-urls'; in - builtins.throw "Input γ${name}γ fetchable -[ ${fus} ]" + builtins.throw "Input γ${name}γfetchable @ [ ${fus} ]" else try-fetch' failed-urls' (builtins.head urls) (builtins.tail urls); in @@ -57,11 +56,11 @@ let builtin-to-input = name: input: let k = builtins.head input.kd; in if k == 1 then - builtin-fetch-tarball { - inherit name; - kind = builtins.elemAt input.kd 1; - hash = input.ha; - } + builtin-fetch-tarball { + inherit name; + kind = builtins.elemAt input.kd 1; + hash = input.ha; + } else throw "Unsupported input kind β${builtins.toString k}β."; @@ -88,11 +87,11 @@ let to-input = name: input: let k = builtins.head input.kd; in if k == 1 then - fetch-zip { - inherit name; - kind = builtins.elemAt input.kd 1; - hash = input.ha; - } + fetch-zip { + inherit name; + kind = builtins.elemAt input.kd 1; + hash = input.ha; + } else throw "Unsupported input kind β${builtins.toString k}β."; in |
