From af6e44b116f643bdd21a92d0760188e3389f3285 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 14 May 2025 22:21:01 +0200 Subject: [PATCH 1/2] doc/rl-next: Add c-api --- doc/manual/rl-next/c-api.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/manual/rl-next/c-api.md diff --git a/doc/manual/rl-next/c-api.md b/doc/manual/rl-next/c-api.md new file mode 100644 index 000000000..3b2abfda5 --- /dev/null +++ b/doc/manual/rl-next/c-api.md @@ -0,0 +1,19 @@ +--- +synopsis: "C API: functions for locking and loading a flake" +issues: 10435 +prs: [12877, 13098] +--- + +This release adds functions to the C API for handling the loading of flakes. Previously, this had to be worked around by using `builtins.getFlake`. +C API consumers and language bindings now have access to basic locking functionality. + +It does not expose the full locking API, so that the implementation can evolve more freely. +Locking is controlled with the functions, which cover the common use cases for consuming a flake: +- `nix_flake_lock_flags_set_mode_check` +- `nix_flake_lock_flags_set_mode_virtual` +- `nix_flake_lock_flags_set_mode_write_as_needed` +- `nix_flake_lock_flags_add_input_override`, which also enables `virtual` + +This change also introduces the new `nix-fetchers-c` library, whose single purpose for now is to manage the (`nix.conf`) settings for the built-in fetchers. + +More details can be found in the [C API documentation](@docroot@/c-api.md). From 132c20872f6e162e0b7de14fa9d155f0e0206f49 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 14 May 2025 23:03:33 +0200 Subject: [PATCH 2/2] doc/manual: Render unreleased release notes on `master` This renders the rl-next notes when `officialRelease = false`, which corresponds to the case where we're not on a release branch. Previously we had disabled this behavior because changelog-d is somewhat of a heavy dependency, being the only Haskell package. However, we now have new circumstances that topple the tradeoff. - We render `master` docs to https://nix.dev/manual/nix/development/release-notes/rl-next.html - `.#manual` is a separate build now, so `nix build nix/foo` is not affected by the increased closure of build input outputs. Because of these factors, I believe adding this functionality back is more valuable, as we can use it to - Previous release notes - Showcase the upcoming release to the community --- doc/manual/package.nix | 30 ++++++++++++++++++++---------- packaging/components.nix | 1 + 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/doc/manual/package.nix b/doc/manual/package.nix index 8f5d0dfe1..af6d46a2a 100644 --- a/doc/manual/package.nix +++ b/doc/manual/package.nix @@ -11,6 +11,8 @@ python3, rsync, nix-cli, + changelog-d, + officialRelease, # Configuration Options @@ -44,16 +46,24 @@ mkMesonDerivation (finalAttrs: { ]; # Hack for sake of the dev shell - passthru.externalNativeBuildInputs = [ - meson - ninja - (lib.getBin lowdown-unsandboxed) - mdbook - mdbook-linkcheck - jq - python3 - rsync - ]; + passthru.externalNativeBuildInputs = + [ + meson + ninja + (lib.getBin lowdown-unsandboxed) + mdbook + mdbook-linkcheck + jq + python3 + rsync + changelog-d + ] + ++ lib.optionals (!officialRelease) [ + # When not an official release, we likely have changelog entries that have + # yet to be rendered. + # When released, these are rendered into a committed file to save a dependency. + changelog-d + ]; nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [ nix-cli diff --git a/packaging/components.nix b/packaging/components.nix index 6351ac712..8e3c21b7d 100644 --- a/packaging/components.nix +++ b/packaging/components.nix @@ -211,6 +211,7 @@ in { version = baseVersion + versionSuffix; inherit versionSuffix; + inherit officialRelease; inherit maintainers; inherit filesetToSource;