lix/src/libexpr/flake
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
..
call-flake.nix flakes: Differentiate self.outPath and self.sourceInfo.outPath 2023-02-22 03:31:24 +01:00
config.cc Whitelist commit-lockfile-summary in flake nixConfig 2023-04-14 11:33:38 -07:00
flake.cc Add parseFlakeRef and flakeRefToString builtins (#8670) 2023-07-25 17:43:33 +00:00
flake.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
flakeref.cc Split OutputsSpec and ExtendedOutputsSpec, use the former more 2023-01-11 18:57:18 -05:00
flakeref.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
lockfile.cc Explicitely define LockFile::operator!= 2023-04-05 17:20:04 +02:00
lockfile.hh Merge pull request #8170 from tweag/fix-aarch64-build 2023-04-11 12:35:23 +02:00