lix/src
Alex Ameen 2d1d81114d
Add parseFlakeRef and flakeRefToString builtins (#8670)
Over the last year or so I've run into several use cases where I need to
parse and/or serialize URLs for use by `builtins.fetchTree` or
`builtins.getFlake`, largely in order to produce _lockfile-like_ files
for lang2nix frameworks or tools which use `nix` internally to drive
builds.

I've gone through the painstaking process of emulating
`nix::FlakeRef::fromAttrs` and `nix::parseFlakeRef` several times with
mixed success; but these are difficult to create and even harder to
maintain if I hope to stay aligned with changes to the real
parser/serializer.

I understand why adding new `builtins` isn't something we want to do
flagrantly. I'm recommending this addition simply because I keep
encountering use cases where I need to parse/serialize these URIs in
`nix` expressions, and I want a reliable solution.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-25 17:43:33 +00:00
..
build-remote Put worker protocol items inside a WorkerProto struct 2023-06-19 12:08:23 -04:00
libcmd Tighten #includes: DerivedPath doesn't care about Realisation 2023-07-20 15:42:06 -04:00
libexpr Add parseFlakeRef and flakeRefToString builtins (#8670) 2023-07-25 17:43:33 +00:00
libfetchers Simplify ContentAddress 2023-07-07 07:30:01 -04:00
libmain nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
libstore Clean up store hierarchy with IndirectRootStore 2023-07-24 09:19:44 -04:00
libutil Merge pull request #8374 from obsidiansystems/improve-path-setting 2023-06-21 15:40:43 -04:00
nix Merge pull request #8650 from obsidiansystems/content-address-simpler 2023-07-21 13:46:53 +02:00
nix-build nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
nix-channel Add nix-channel --list-generations 2023-06-02 10:12:35 +02:00
nix-collect-garbage Clean up a few things related to profiles (#8526) 2023-06-19 04:04:59 +00:00
nix-copy-closure Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
nix-env Clean up a few things related to profiles (#8526) 2023-06-19 04:04:59 +00:00
nix-instantiate nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
nix-store Simplify ContentAddress 2023-07-07 07:30:01 -04:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00