diff options
| -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 |
