From e5552070483866a6fe6bcca63b60450f8247106d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 17 Apr 2025 14:00:24 +0200 Subject: [PATCH 01/29] Bump version --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index 0bd6cbc1e..1eb56ea3a 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.28.2 +2.28.3 From ba22a85a3592897272e9783227d0e3f539e76018 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 20 Apr 2025 22:20:52 +0200 Subject: [PATCH 02/29] Fix pkgs.nixVersions and installTests ... by moving our stuff out of the way from upstream's `nixComponents` and `nixDependencies` attrsets. (I prefer not to use overlays, but let's make it work this way first) (cherry picked from commit b257ea94e32652b2f822f85e5b8e6a9524c47fe1) --- flake.nix | 36 +++++++++++----------- packaging/dev-shell.nix | 50 +++++++++++++++---------------- packaging/hydra.nix | 26 ++++++++-------- tests/nixos/default.nix | 2 +- tests/nixos/functional/common.nix | 4 +-- 5 files changed, 59 insertions(+), 59 deletions(-) diff --git a/flake.nix b/flake.nix index 674326925..a993648f2 100644 --- a/flake.nix +++ b/flake.nix @@ -143,14 +143,14 @@ # without "polluting" the top level "`pkgs`" attrset. # This also has the benefit of providing us with a distinct set of packages # we can iterate over. - nixComponents = + nixComponents2 = lib.makeScopeWithSplicing' { inherit (final) splicePackages; - inherit (final.nixDependencies) newScope; + inherit (final.nixDependencies2) newScope; } { - otherSplices = final.generateSplicesForMkScope "nixComponents"; + otherSplices = final.generateSplicesForMkScope "nixComponents2"; f = import ./packaging/components.nix { inherit (final) lib; inherit officialRelease; @@ -161,22 +161,22 @@ }; # The dependencies are in their own scope, so that they don't have to be - # in Nixpkgs top level `pkgs` or `nixComponents`. - nixDependencies = + # in Nixpkgs top level `pkgs` or `nixComponents2`. + nixDependencies2 = lib.makeScopeWithSplicing' { inherit (final) splicePackages; - inherit (final) newScope; # layered directly on pkgs, unlike nixComponents above + inherit (final) newScope; # layered directly on pkgs, unlike nixComponents2 above } { - otherSplices = final.generateSplicesForMkScope "nixDependencies"; + otherSplices = final.generateSplicesForMkScope "nixDependencies2"; f = import ./packaging/dependencies.nix { inherit inputs stdenv; pkgs = final; }; }; - nix = final.nixComponents.nix-cli; + nix = final.nixComponents2.nix-cli; # See https://github.com/NixOS/nixpkgs/pull/214409 # Remove when fixed in this flake's nixpkgs @@ -277,7 +277,7 @@ # memory leaks with detect_leaks=0. "" = rec { nixpkgs = nixpkgsFor.${system}.native; - nixComponents = nixpkgs.nixComponents.overrideScope ( + nixComponents = nixpkgs.nixComponents2.overrideScope ( nixCompFinal: nixCompPrev: { mesonComponentOverrides = _finalAttrs: prevAttrs: { mesonFlags = @@ -305,7 +305,7 @@ nixpkgsPrefix: { nixpkgs, - nixComponents ? nixpkgs.nixComponents, + nixComponents ? nixpkgs.nixComponents2, }: flatMapAttrs nixComponents ( pkgName: pkg: @@ -335,9 +335,9 @@ binaryTarball = self.hydraJobs.binaryTarball.${system}; # TODO probably should be `nix-cli` nix = self.packages.${system}.nix-everything; - nix-manual = nixpkgsFor.${system}.native.nixComponents.nix-manual; - nix-internal-api-docs = nixpkgsFor.${system}.native.nixComponents.nix-internal-api-docs; - nix-external-api-docs = nixpkgsFor.${system}.native.nixComponents.nix-external-api-docs; + nix-manual = nixpkgsFor.${system}.native.nixComponents2.nix-manual; + nix-internal-api-docs = nixpkgsFor.${system}.native.nixComponents2.nix-internal-api-docs; + nix-external-api-docs = nixpkgsFor.${system}.native.nixComponents2.nix-external-api-docs; } # We need to flatten recursive attribute sets of derivations to pass `flake check`. // @@ -389,9 +389,9 @@ }: { # These attributes go right into `packages.`. - "${pkgName}" = nixpkgsFor.${system}.native.nixComponents.${pkgName}; - "${pkgName}-static" = nixpkgsFor.${system}.native.pkgsStatic.nixComponents.${pkgName}; - "${pkgName}-llvm" = nixpkgsFor.${system}.native.pkgsLLVM.nixComponents.${pkgName}; + "${pkgName}" = nixpkgsFor.${system}.native.nixComponents2.${pkgName}; + "${pkgName}-static" = nixpkgsFor.${system}.native.pkgsStatic.nixComponents2.${pkgName}; + "${pkgName}-llvm" = nixpkgsFor.${system}.native.pkgsLLVM.nixComponents2.${pkgName}; } // lib.optionalAttrs supportsCross ( flatMapAttrs (lib.genAttrs crossSystems (_: { })) ( @@ -399,7 +399,7 @@ { }: { # These attributes go right into `packages.`. - "${pkgName}-${crossSystem}" = nixpkgsFor.${system}.cross.${crossSystem}.nixComponents.${pkgName}; + "${pkgName}-${crossSystem}" = nixpkgsFor.${system}.cross.${crossSystem}.nixComponents2.${pkgName}; } ) ) @@ -409,7 +409,7 @@ { # These attributes go right into `packages.`. "${pkgName}-${stdenvName}" = - nixpkgsFor.${system}.nativeForStdenv.${stdenvName}.nixComponents.${pkgName}; + nixpkgsFor.${system}.nativeForStdenv.${stdenvName}.nixComponents2.${pkgName}; } ) ) diff --git a/packaging/dev-shell.nix b/packaging/dev-shell.nix index e824ebf71..f9b19c3c4 100644 --- a/packaging/dev-shell.nix +++ b/packaging/dev-shell.nix @@ -5,11 +5,11 @@ { pkgs }: -pkgs.nixComponents.nix-util.overrideAttrs ( +pkgs.nixComponents2.nix-util.overrideAttrs ( attrs: let - stdenv = pkgs.nixDependencies.stdenv; + stdenv = pkgs.nixDependencies2.stdenv; buildCanExecuteHost = stdenv.buildPlatform.canExecute stdenv.hostPlatform; modular = devFlake.getSystem stdenv.buildPlatform.system; transformFlag = @@ -79,26 +79,26 @@ pkgs.nixComponents.nix-util.overrideAttrs ( }; mesonFlags = - map (transformFlag "libutil") (ignoreCrossFile pkgs.nixComponents.nix-util.mesonFlags) - ++ map (transformFlag "libstore") (ignoreCrossFile pkgs.nixComponents.nix-store.mesonFlags) - ++ map (transformFlag "libfetchers") (ignoreCrossFile pkgs.nixComponents.nix-fetchers.mesonFlags) + map (transformFlag "libutil") (ignoreCrossFile pkgs.nixComponents2.nix-util.mesonFlags) + ++ map (transformFlag "libstore") (ignoreCrossFile pkgs.nixComponents2.nix-store.mesonFlags) + ++ map (transformFlag "libfetchers") (ignoreCrossFile pkgs.nixComponents2.nix-fetchers.mesonFlags) ++ lib.optionals havePerl ( - map (transformFlag "perl") (ignoreCrossFile pkgs.nixComponents.nix-perl-bindings.mesonFlags) + map (transformFlag "perl") (ignoreCrossFile pkgs.nixComponents2.nix-perl-bindings.mesonFlags) ) - ++ map (transformFlag "libexpr") (ignoreCrossFile pkgs.nixComponents.nix-expr.mesonFlags) - ++ map (transformFlag "libcmd") (ignoreCrossFile pkgs.nixComponents.nix-cmd.mesonFlags); + ++ map (transformFlag "libexpr") (ignoreCrossFile pkgs.nixComponents2.nix-expr.mesonFlags) + ++ map (transformFlag "libcmd") (ignoreCrossFile pkgs.nixComponents2.nix-cmd.mesonFlags); nativeBuildInputs = attrs.nativeBuildInputs or [ ] - ++ pkgs.nixComponents.nix-util.nativeBuildInputs - ++ pkgs.nixComponents.nix-store.nativeBuildInputs - ++ pkgs.nixComponents.nix-fetchers.nativeBuildInputs - ++ pkgs.nixComponents.nix-expr.nativeBuildInputs - ++ lib.optionals havePerl pkgs.nixComponents.nix-perl-bindings.nativeBuildInputs - ++ lib.optionals buildCanExecuteHost pkgs.nixComponents.nix-manual.externalNativeBuildInputs - ++ pkgs.nixComponents.nix-internal-api-docs.nativeBuildInputs - ++ pkgs.nixComponents.nix-external-api-docs.nativeBuildInputs - ++ pkgs.nixComponents.nix-functional-tests.externalNativeBuildInputs + ++ pkgs.nixComponents2.nix-util.nativeBuildInputs + ++ pkgs.nixComponents2.nix-store.nativeBuildInputs + ++ pkgs.nixComponents2.nix-fetchers.nativeBuildInputs + ++ pkgs.nixComponents2.nix-expr.nativeBuildInputs + ++ lib.optionals havePerl pkgs.nixComponents2.nix-perl-bindings.nativeBuildInputs + ++ lib.optionals buildCanExecuteHost pkgs.nixComponents2.nix-manual.externalNativeBuildInputs + ++ pkgs.nixComponents2.nix-internal-api-docs.nativeBuildInputs + ++ pkgs.nixComponents2.nix-external-api-docs.nativeBuildInputs + ++ pkgs.nixComponents2.nix-functional-tests.externalNativeBuildInputs ++ lib.optional ( !buildCanExecuteHost # Hack around https://github.com/nixos/nixpkgs/commit/bf7ad8cfbfa102a90463433e2c5027573b462479 @@ -123,14 +123,14 @@ pkgs.nixComponents.nix-util.overrideAttrs ( buildInputs = attrs.buildInputs or [ ] - ++ pkgs.nixComponents.nix-util.buildInputs - ++ pkgs.nixComponents.nix-store.buildInputs - ++ pkgs.nixComponents.nix-store-tests.externalBuildInputs - ++ pkgs.nixComponents.nix-fetchers.buildInputs - ++ pkgs.nixComponents.nix-expr.buildInputs - ++ pkgs.nixComponents.nix-expr.externalPropagatedBuildInputs - ++ pkgs.nixComponents.nix-cmd.buildInputs - ++ lib.optionals havePerl pkgs.nixComponents.nix-perl-bindings.externalBuildInputs + ++ pkgs.nixComponents2.nix-util.buildInputs + ++ pkgs.nixComponents2.nix-store.buildInputs + ++ pkgs.nixComponents2.nix-store-tests.externalBuildInputs + ++ pkgs.nixComponents2.nix-fetchers.buildInputs + ++ pkgs.nixComponents2.nix-expr.buildInputs + ++ pkgs.nixComponents2.nix-expr.externalPropagatedBuildInputs + ++ pkgs.nixComponents2.nix-cmd.buildInputs + ++ lib.optionals havePerl pkgs.nixComponents2.nix-perl-bindings.externalBuildInputs ++ lib.optional havePerl pkgs.perl; } ) diff --git a/packaging/hydra.nix b/packaging/hydra.nix index 74e245f26..fa126115f 100644 --- a/packaging/hydra.nix +++ b/packaging/hydra.nix @@ -19,14 +19,14 @@ let testNixVersions = pkgs: daemon: - pkgs.nixComponents.nix-functional-tests.override { + pkgs.nixComponents2.nix-functional-tests.override { pname = "nix-daemon-compat-tests"; version = "${pkgs.nix.version}-with-daemon-${daemon.version}"; test-daemon = daemon; }; - # Technically we could just return `pkgs.nixComponents`, but for Hydra it's + # Technically we could just return `pkgs.nixComponents2`, but for Hydra it's # convention to transpose it, and to transpose it efficiently, we need to # enumerate them manually, so that we don't evaluate unnecessary package sets. # See listingIsComplete below. @@ -85,7 +85,7 @@ in } (_: null); actualPkgs = lib.concatMapAttrs ( k: v: if lib.strings.hasPrefix "nix-" k then { ${k} = null; } else { } - ) nixpkgsFor.${arbitrarySystem}.native.nixComponents; + ) nixpkgsFor.${arbitrarySystem}.native.nixComponents2; diff = lib.concatStringsSep "\n" ( lib.concatLists ( lib.mapAttrsToList ( @@ -111,7 +111,7 @@ in # Binary package for various platforms. build = forAllPackages ( - pkgName: forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.${pkgName}) + pkgName: forAllSystems (system: nixpkgsFor.${system}.native.nixComponents2.${pkgName}) ); shellInputs = removeAttrs (forAllSystems ( @@ -121,7 +121,7 @@ in buildStatic = forAllPackages ( pkgName: lib.genAttrs linux64BitSystems ( - system: nixpkgsFor.${system}.native.pkgsStatic.nixComponents.${pkgName} + system: nixpkgsFor.${system}.native.pkgsStatic.nixComponents2.${pkgName} ) ); @@ -138,7 +138,7 @@ in forAllCrossSystems ( crossSystem: lib.genAttrs [ "x86_64-linux" ] ( - system: nixpkgsFor.${system}.cross.${crossSystem}.nixComponents.${pkgName} + system: nixpkgsFor.${system}.cross.${crossSystem}.nixComponents2.${pkgName} ) ) ) @@ -148,7 +148,7 @@ in let components = forAllSystems ( system: - nixpkgsFor.${system}.native.nixComponents.overrideScope ( + nixpkgsFor.${system}.native.nixComponents2.overrideScope ( self: super: { nix-expr = super.nix-expr.override { enableGC = false; }; } @@ -157,7 +157,7 @@ in in forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName})); - buildNoTests = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.nix-cli); + buildNoTests = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents2.nix-cli); # Toggles some settings for better coverage. Windows needs these # library combinations, and Debian build Nix with GNU readline too. @@ -165,7 +165,7 @@ in let components = forAllSystems ( system: - nixpkgsFor.${system}.native.nixComponents.overrideScope ( + nixpkgsFor.${system}.native.nixComponents2.overrideScope ( self: super: { nix-cmd = super.nix-cmd.override { enableMarkdown = false; @@ -178,7 +178,7 @@ in forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName})); # Perl bindings for various platforms. - perlBindings = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.nix-perl-bindings); + perlBindings = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents2.nix-perl-bindings); # Binary tarball for various platforms, containing a Nix store # with the closure of 'nix' package, and the second half of @@ -228,13 +228,13 @@ in # }; # Nix's manual - manual = nixpkgsFor.x86_64-linux.native.nixComponents.nix-manual; + manual = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-manual; # API docs for Nix's unstable internal C++ interfaces. - internal-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents.nix-internal-api-docs; + internal-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-internal-api-docs; # API docs for Nix's C bindings. - external-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents.nix-external-api-docs; + external-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents2.nix-external-api-docs; # System tests. tests = diff --git a/tests/nixos/default.nix b/tests/nixos/default.nix index 92f89d8db..3e2d20a71 100644 --- a/tests/nixos/default.nix +++ b/tests/nixos/default.nix @@ -31,7 +31,7 @@ let nixpkgs.pkgs = nixpkgsFor.${system}.native; nix.checkAllErrors = false; # TODO: decide which packaging stage to use. `nix-cli` is efficient, but not the same as the user-facing `everything.nix` package (`default`). Perhaps a good compromise is `everything.nix` + `noTests` defined above? - nix.package = nixpkgsFor.${system}.native.nixComponents.nix-cli; + nix.package = nixpkgsFor.${system}.native.nixComponents2.nix-cli; # Evaluate VMs faster documentation.enable = false; diff --git a/tests/nixos/functional/common.nix b/tests/nixos/functional/common.nix index f3cab4725..a2067c07d 100644 --- a/tests/nixos/functional/common.nix +++ b/tests/nixos/functional/common.nix @@ -49,11 +49,11 @@ in cd ~ - cp -r ${pkgs.nixComponents.nix-functional-tests.src} nix + cp -r ${pkgs.nixComponents2.nix-functional-tests.src} nix chmod -R +w nix chmod u+w nix/.version - echo ${pkgs.nixComponents.version} > nix/.version + echo ${pkgs.nixComponents2.version} > nix/.version export isTestOnNixOS=1 From f666ec3837a8f4f079843213c2e23eec7d4a941f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 20 Apr 2025 17:20:54 -0400 Subject: [PATCH 03/29] Explain the use of "2" in the overlay Co-authored-by: Robert Hensing (cherry picked from commit ef368068984feb73bae4fef5ecef5c9419a5a4de) --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index a993648f2..4177595c3 100644 --- a/flake.nix +++ b/flake.nix @@ -143,6 +143,7 @@ # without "polluting" the top level "`pkgs`" attrset. # This also has the benefit of providing us with a distinct set of packages # we can iterate over. + # The `2` suffix is here because otherwise it interferes with `nixVersions.latest`, which is used in daemon compat tests. nixComponents2 = lib.makeScopeWithSplicing' { @@ -162,6 +163,7 @@ # The dependencies are in their own scope, so that they don't have to be # in Nixpkgs top level `pkgs` or `nixComponents2`. + # The `2` suffix is here because otherwise it interferes with `nixVersions.latest`, which is used in daemon compat tests. nixDependencies2 = lib.makeScopeWithSplicing' { From d3c79e2b1379ad747a61d708b780d0daec11da32 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Apr 2025 17:50:45 +0200 Subject: [PATCH 04/29] Don't build MonitorFdHup on Windows https://hydra.nixos.org/build/295398462 (cherry picked from commit a9b62132210beadbd3905e42260b85bec7205de1) --- src/libutil-tests/monitorfdhup.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libutil-tests/monitorfdhup.cc b/src/libutil-tests/monitorfdhup.cc index f9da4022d..8e6fed6f0 100644 --- a/src/libutil-tests/monitorfdhup.cc +++ b/src/libutil-tests/monitorfdhup.cc @@ -1,8 +1,10 @@ -#include "nix/util/util.hh" -#include "nix/util/monitor-fd.hh" +#ifndef _WIN32 -#include -#include +# include "nix/util/util.hh" +# include "nix/util/monitor-fd.hh" + +# include +# include namespace nix { TEST(MonitorFdHup, shouldNotBlock) @@ -16,3 +18,5 @@ TEST(MonitorFdHup, shouldNotBlock) } } } + +#endif From 5a2ee1b9520ebb6fbb033a033558b181bcb8f411 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Apr 2025 17:11:55 +0200 Subject: [PATCH 05/29] Move libflake/flake/* to libflake (cherry picked from commit bc67e47298022d6d0bcc270421b01e0697d63030) --- maintainers/flake-module.nix | 10 +++++----- src/libflake/{flake => }/config.cc | 0 src/libflake/{flake => }/flake-primops.cc | 0 src/libflake/{flake => }/flake.cc | 0 src/libflake/{flake => }/flakeref.cc | 0 src/libflake/{flake => }/lockfile.cc | 0 src/libflake/meson.build | 14 +++++++------- src/libflake/{flake => }/settings.cc | 0 src/libflake/{flake => }/url-name.cc | 0 9 files changed, 12 insertions(+), 12 deletions(-) rename src/libflake/{flake => }/config.cc (100%) rename src/libflake/{flake => }/flake-primops.cc (100%) rename src/libflake/{flake => }/flake.cc (100%) rename src/libflake/{flake => }/flakeref.cc (100%) rename src/libflake/{flake => }/lockfile.cc (100%) rename src/libflake/{flake => }/settings.cc (100%) rename src/libflake/{flake => }/url-name.cc (100%) diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index a8c52eb46..ff40b09d1 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -172,14 +172,14 @@ ''^src/libfetchers/include/nix/fetchers/tarball\.hh$'' ''^src/libfetchers/git\.cc$'' ''^src/libfetchers/mercurial\.cc$'' - ''^src/libflake/flake/config\.cc$'' - ''^src/libflake/flake/flake\.cc$'' + ''^src/libflake/config\.cc$'' + ''^src/libflake/flake\.cc$'' ''^src/libflake/include/nix/flake/flake\.hh$'' - ''^src/libflake/flake/flakeref\.cc$'' + ''^src/libflake/flakeref\.cc$'' ''^src/libflake/include/nix/flake/flakeref\.hh$'' - ''^src/libflake/flake/lockfile\.cc$'' + ''^src/libflake/lockfile\.cc$'' ''^src/libflake/include/nix/flake/lockfile\.hh$'' - ''^src/libflake/flake/url-name\.cc$'' + ''^src/libflake/url-name\.cc$'' ''^src/libmain/common-args\.cc$'' ''^src/libmain/include/nix/main/common-args\.hh$'' ''^src/libmain/loggers\.cc$'' diff --git a/src/libflake/flake/config.cc b/src/libflake/config.cc similarity index 100% rename from src/libflake/flake/config.cc rename to src/libflake/config.cc diff --git a/src/libflake/flake/flake-primops.cc b/src/libflake/flake-primops.cc similarity index 100% rename from src/libflake/flake/flake-primops.cc rename to src/libflake/flake-primops.cc diff --git a/src/libflake/flake/flake.cc b/src/libflake/flake.cc similarity index 100% rename from src/libflake/flake/flake.cc rename to src/libflake/flake.cc diff --git a/src/libflake/flake/flakeref.cc b/src/libflake/flakeref.cc similarity index 100% rename from src/libflake/flake/flakeref.cc rename to src/libflake/flakeref.cc diff --git a/src/libflake/flake/lockfile.cc b/src/libflake/lockfile.cc similarity index 100% rename from src/libflake/flake/lockfile.cc rename to src/libflake/lockfile.cc diff --git a/src/libflake/meson.build b/src/libflake/meson.build index f4c034490..bc8533e15 100644 --- a/src/libflake/meson.build +++ b/src/libflake/meson.build @@ -39,13 +39,13 @@ foreach header : [ endforeach sources = files( - 'flake/config.cc', - 'flake/flake.cc', - 'flake/flakeref.cc', - 'flake/lockfile.cc', - 'flake/flake-primops.cc', - 'flake/settings.cc', - 'flake/url-name.cc', + 'config.cc', + 'flake.cc', + 'flakeref.cc', + 'lockfile.cc', + 'flake-primops.cc', + 'settings.cc', + 'url-name.cc', ) subdir('include/nix/flake') diff --git a/src/libflake/flake/settings.cc b/src/libflake/settings.cc similarity index 100% rename from src/libflake/flake/settings.cc rename to src/libflake/settings.cc diff --git a/src/libflake/flake/url-name.cc b/src/libflake/url-name.cc similarity index 100% rename from src/libflake/flake/url-name.cc rename to src/libflake/url-name.cc From 04fcc879e6b13373a144b68df1c035e7adf53226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 24 Apr 2025 11:28:02 +0200 Subject: [PATCH 06/29] Revert "Actually ignore system/user registries during locking" This reverts commit 77d4316353deaf8f429025738891b625eb0b5d8a. (cherry picked from commit 3b5f0d9fb3af870b832bdcadcf8080649bcd0cd5) --- src/libflake/flakeref.cc | 2 +- tests/functional/flakes/flakes.sh | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libflake/flakeref.cc b/src/libflake/flakeref.cc index 1580c2846..6e95eb767 100644 --- a/src/libflake/flakeref.cc +++ b/src/libflake/flakeref.cc @@ -39,7 +39,7 @@ FlakeRef FlakeRef::resolve( ref store, const fetchers::RegistryFilter & filter) const { - auto [input2, extraAttrs] = lookupInRegistries(store, input, filter); + auto [input2, extraAttrs] = lookupInRegistries(store, input); return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir)); } diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh index b67a0964a..d8c9f254d 100755 --- a/tests/functional/flakes/flakes.sh +++ b/tests/functional/flakes/flakes.sh @@ -220,13 +220,6 @@ nix store gc nix registry list --flake-registry "file://$registry" --refresh | grepQuiet flake3 mv "$registry.tmp" "$registry" -# Ensure that locking ignores the user registry. -mkdir -p "$TEST_HOME/.config/nix" -ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json" -nix flake metadata flake1 -expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries" -rm "$TEST_HOME/.config/nix/registry.json" - # Test whether flakes are registered as GC roots for offline use. # FIXME: use tarballs rather than git. rm -rf "$TEST_HOME/.cache" From 6390b8b7cfd4e6f41328fd881f4583e462a19168 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 24 Apr 2025 07:56:11 -0700 Subject: [PATCH 07/29] nix-cli: restore binary-dist artifact to Hydra static builds (cherry picked from commit e1b68244ade89a0e3ad9ea5da3e41eb77aba1b15) --- src/nix/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nix/package.nix b/src/nix/package.nix index 40a280437..3d4f6f40b 100644 --- a/src/nix/package.nix +++ b/src/nix/package.nix @@ -1,4 +1,5 @@ { + stdenv, lib, mkMesonExecutable, @@ -94,6 +95,11 @@ mkMesonExecutable (finalAttrs: { mesonFlags = [ ]; + postInstall = lib.optionalString stdenv.hostPlatform.isStatic '' + mkdir -p $out/nix-support + echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products + ''; + meta = { mainProgram = "nix"; platforms = lib.platforms.unix ++ lib.platforms.windows; From b179259d6ff6344570e4c3de0c3b55d280547e62 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Thu, 24 Apr 2025 22:27:03 +0000 Subject: [PATCH 08/29] libutil: Use correct argument to Error format ctor It seems that the intention was to format a number in base 8 (as suggested by the %o format specifier), but `perms` is a `std::string` and not a number. Looks like `rawMode` is the correct thing to use here. (cherry picked from commit 1b5c8aac123d96b907972a9cbb67891ff17caf7a) --- src/libutil/git.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/git.cc b/src/libutil/git.cc index 45cda1c2c..edeef71b7 100644 --- a/src/libutil/git.cc +++ b/src/libutil/git.cc @@ -134,7 +134,7 @@ void parseTree( RawMode rawMode = std::stoi(perms, 0, 8); auto modeOpt = decodeMode(rawMode); if (!modeOpt) - throw Error("Unknown Git permission: %o", perms); + throw Error("Unknown Git permission: %o", rawMode); auto mode = std::move(*modeOpt); std::string name = getStringUntil(source, '\0'); From 10350537b1010862dc3a2ac116699948e70cf5c8 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Thu, 24 Apr 2025 21:00:24 +0000 Subject: [PATCH 09/29] libutil: Fix invalid boost format string in infinite symlink recursion error Found while working on an automated migration to `std::format`. (cherry picked from commit bfb357c40b289490ad841cc7271f2afa92081d34) --- src/libutil/file-system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/file-system.cc b/src/libutil/file-system.cc index c7cea4b58..6fb797103 100644 --- a/src/libutil/file-system.cc +++ b/src/libutil/file-system.cc @@ -111,7 +111,7 @@ Path canonPath(PathView path, bool resolveSymlinks) (std::string & result, std::string_view & remaining) { if (resolveSymlinks && fs::is_symlink(result)) { if (++followCount >= maxFollow) - throw Error("infinite symlink recursion in path '%0%'", remaining); + throw Error("infinite symlink recursion in path '%1%'", remaining); remaining = (temp = concatStrings(readLink(result), remaining)); if (isAbsolute(remaining)) { /* restart for symlinks pointing to absolute path */ From dfbb52e6bd037cd8c25d00a7f40a688ddcfe9dca Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Apr 2025 18:54:16 +0200 Subject: [PATCH 10/29] lockFlake(): Allow registry lookups for the top-level flake Fixes #13050. (cherry picked from commit 68de26d38afea6b87460afec77c85e1642a269ff) --- src/libcmd/installables.cc | 2 +- src/libexpr/primops/fetchTree.cc | 2 +- .../include/nix/fetchers/registry.hh | 8 +++- src/libfetchers/registry.cc | 13 +++++- src/libflake/flake.cc | 41 +++++++++++-------- src/libflake/flakeref.cc | 4 +- src/libflake/include/nix/flake/flake.hh | 2 +- src/libflake/include/nix/flake/flakeref.hh | 2 +- tests/functional/flakes/flakes.sh | 7 ++++ 9 files changed, 55 insertions(+), 26 deletions(-) diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 2ebfac3e6..1c414e9e2 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -40,7 +40,7 @@ void completeFlakeInputAttrPath( std::string_view prefix) { for (auto & flakeRef : flakeRefs) { - auto flake = flake::getFlake(*evalState, flakeRef, true); + auto flake = flake::getFlake(*evalState, flakeRef, fetchers::UseRegistries::All); for (auto & input : flake.inputs) if (hasPrefix(input.first, prefix)) completions.add(input.first); diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index 0be9f4bdc..745705e04 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -181,7 +181,7 @@ static void fetchTree( } if (!state.settings.pureEval && !input.isDirect() && experimentalFeatureSettings.isEnabled(Xp::Flakes)) - input = lookupInRegistries(state.store, input).first; + input = lookupInRegistries(state.store, input, fetchers::UseRegistries::Limited).first; if (state.settings.pureEval && !input.isLocked()) { if (input.getNarHash()) diff --git a/src/libfetchers/include/nix/fetchers/registry.hh b/src/libfetchers/include/nix/fetchers/registry.hh index 47ff9e86f..efbfe07c8 100644 --- a/src/libfetchers/include/nix/fetchers/registry.hh +++ b/src/libfetchers/include/nix/fetchers/registry.hh @@ -65,7 +65,11 @@ void overrideRegistry( const Input & to, const Attrs & extraAttrs); -using RegistryFilter = std::function; +enum class UseRegistries : int { + No, + All, + Limited, // global and flag registry only +}; /** * Rewrite a flakeref using the registries. If `filter` is set, only @@ -74,6 +78,6 @@ using RegistryFilter = std::function; std::pair lookupInRegistries( ref store, const Input & input, - const RegistryFilter & filter = {}); + UseRegistries useRegistries); } diff --git a/src/libfetchers/registry.cc b/src/libfetchers/registry.cc index e9b55f7f2..bfaf9569a 100644 --- a/src/libfetchers/registry.cc +++ b/src/libfetchers/registry.cc @@ -14,6 +14,8 @@ std::shared_ptr Registry::read( const Settings & settings, const Path & path, RegistryType type) { + debug("reading registry '%s'", path); + auto registry = std::make_shared(settings, type); if (!pathExists(path)) @@ -179,29 +181,36 @@ Registries getRegistries(const Settings & settings, ref store) std::pair lookupInRegistries( ref store, const Input & _input, - const RegistryFilter & filter) + UseRegistries useRegistries) { Attrs extraAttrs; int n = 0; Input input(_input); + if (useRegistries == UseRegistries::No) + return {input, extraAttrs}; + restart: n++; if (n > 100) throw Error("cycle detected in flake registry for '%s'", input.to_string()); for (auto & registry : getRegistries(*input.settings, store)) { - if (filter && !filter(registry->type)) continue; + if (useRegistries == UseRegistries::Limited + && !(registry->type == fetchers::Registry::Flag || registry->type == fetchers::Registry::Global)) + continue; // FIXME: O(n) for (auto & entry : registry->entries) { if (entry.exact) { if (entry.from == input) { + debug("resolved flakeref '%s' against registry %d exactly", input.to_string(), registry->type); input = entry.to; extraAttrs = entry.extraAttrs; goto restart; } } else { if (entry.from.contains(input)) { + debug("resolved flakeref '%s' against registry %d", input.to_string(), registry->type); input = entry.to.applyOverrides( !entry.from.getRef() && input.getRef() ? input.getRef() : std::optional(), !entry.from.getRev() && input.getRev() ? input.getRev() : std::optional()); diff --git a/src/libflake/flake.cc b/src/libflake/flake.cc index 1cce0c978..89cf3a7fd 100644 --- a/src/libflake/flake.cc +++ b/src/libflake/flake.cc @@ -45,7 +45,7 @@ static std::optional lookupInFlakeCache( static std::tuple, FlakeRef, FlakeRef> fetchOrSubstituteTree( EvalState & state, const FlakeRef & originalRef, - bool useRegistries, + fetchers::UseRegistries useRegistries, FlakeCache & flakeCache) { auto fetched = lookupInFlakeCache(flakeCache, originalRef); @@ -56,14 +56,8 @@ static std::tuple, FlakeRef, FlakeRef> fetchOrSubstituteTree auto [accessor, lockedRef] = originalRef.lazyFetch(state.store); fetched.emplace(FetchedFlake{.lockedRef = lockedRef, .accessor = accessor}); } else { - if (useRegistries) { - resolvedRef = originalRef.resolve( - state.store, - [](fetchers::Registry::RegistryType type) { - /* Only use the global registry and CLI flags - to resolve indirect flakerefs. */ - return type == fetchers::Registry::Flag || type == fetchers::Registry::Global; - }); + if (useRegistries != fetchers::UseRegistries::No) { + resolvedRef = originalRef.resolve(state.store, useRegistries); fetched = lookupInFlakeCache(flakeCache, originalRef); if (!fetched) { auto [accessor, lockedRef] = resolvedRef.lazyFetch(state.store); @@ -396,7 +390,7 @@ static FlakeRef applySelfAttrs( static Flake getFlake( EvalState & state, const FlakeRef & originalRef, - bool useRegistries, + fetchers::UseRegistries useRegistries, FlakeCache & flakeCache, const InputAttrPath & lockRootAttrPath) { @@ -415,7 +409,7 @@ static Flake getFlake( // FIXME: need to remove attrs that are invalidated by the changed input attrs, such as 'narHash'. newLockedRef.input.attrs.erase("narHash"); auto [accessor2, resolvedRef2, lockedRef2] = fetchOrSubstituteTree( - state, newLockedRef, false, flakeCache); + state, newLockedRef, fetchers::UseRegistries::No, flakeCache); accessor = accessor2; lockedRef = lockedRef2; } @@ -427,7 +421,7 @@ static Flake getFlake( return readFlake(state, originalRef, resolvedRef, lockedRef, state.storePath(storePath), lockRootAttrPath); } -Flake getFlake(EvalState & state, const FlakeRef & originalRef, bool useRegistries) +Flake getFlake(EvalState & state, const FlakeRef & originalRef, fetchers::UseRegistries useRegistries) { FlakeCache flakeCache; return getFlake(state, originalRef, useRegistries, flakeCache, {}); @@ -455,8 +449,15 @@ LockedFlake lockFlake( FlakeCache flakeCache; auto useRegistries = lockFlags.useRegistries.value_or(settings.useRegistries); + auto useRegistriesTop = useRegistries ? fetchers::UseRegistries::All : fetchers::UseRegistries::No; + auto useRegistriesInputs = useRegistries ? fetchers::UseRegistries::Limited : fetchers::UseRegistries::No; - auto flake = getFlake(state, topRef, useRegistries, flakeCache, {}); + auto flake = getFlake( + state, + topRef, + useRegistriesTop, + flakeCache, + {}); if (lockFlags.applyNixConfig) { flake.config.apply(settings); @@ -631,7 +632,12 @@ LockedFlake lockFlake( if (auto resolvedPath = resolveRelativePath()) { return readFlake(state, ref, ref, ref, *resolvedPath, inputAttrPath); } else { - return getFlake(state, ref, useRegistries, flakeCache, inputAttrPath); + return getFlake( + state, + ref, + useRegistriesInputs, + flakeCache, + inputAttrPath); } }; @@ -780,7 +786,7 @@ LockedFlake lockFlake( return {*resolvedPath, *input.ref}; } else { auto [accessor, resolvedRef, lockedRef] = fetchOrSubstituteTree( - state, *input.ref, useRegistries, flakeCache); + state, *input.ref, useRegistriesInputs, flakeCache); // FIXME: allow input to be lazy. auto storePath = copyInputToStore(state, lockedRef.input, input.ref->input, accessor); @@ -895,7 +901,10 @@ LockedFlake lockFlake( repo, so we should re-read it. FIXME: we could also just clear the 'rev' field... */ auto prevLockedRef = flake.lockedRef; - flake = getFlake(state, topRef, useRegistries); + flake = getFlake( + state, + topRef, + useRegistriesTop); if (lockFlags.commitLockFile && flake.lockedRef.input.getRev() && diff --git a/src/libflake/flakeref.cc b/src/libflake/flakeref.cc index 6e95eb767..a8b139d65 100644 --- a/src/libflake/flakeref.cc +++ b/src/libflake/flakeref.cc @@ -37,9 +37,9 @@ std::ostream & operator << (std::ostream & str, const FlakeRef & flakeRef) FlakeRef FlakeRef::resolve( ref store, - const fetchers::RegistryFilter & filter) const + fetchers::UseRegistries useRegistries) const { - auto [input2, extraAttrs] = lookupInRegistries(store, input); + auto [input2, extraAttrs] = lookupInRegistries(store, input, useRegistries); return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir)); } diff --git a/src/libflake/include/nix/flake/flake.hh b/src/libflake/include/nix/flake/flake.hh index 3336f8557..ef0bb349b 100644 --- a/src/libflake/include/nix/flake/flake.hh +++ b/src/libflake/include/nix/flake/flake.hh @@ -115,7 +115,7 @@ struct Flake } }; -Flake getFlake(EvalState & state, const FlakeRef & flakeRef, bool useRegistries); +Flake getFlake(EvalState & state, const FlakeRef & flakeRef, fetchers::UseRegistries useRegistries); /** * Fingerprint of a locked flake; used as a cache key. diff --git a/src/libflake/include/nix/flake/flakeref.hh b/src/libflake/include/nix/flake/flakeref.hh index 0fd1fec4d..8c15f9d95 100644 --- a/src/libflake/include/nix/flake/flakeref.hh +++ b/src/libflake/include/nix/flake/flakeref.hh @@ -65,7 +65,7 @@ struct FlakeRef FlakeRef resolve( ref store, - const fetchers::RegistryFilter & filter = {}) const; + fetchers::UseRegistries useRegistries = fetchers::UseRegistries::All) const; static FlakeRef fromAttrs( const fetchers::Settings & fetchSettings, diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh index d8c9f254d..aac505d41 100755 --- a/tests/functional/flakes/flakes.sh +++ b/tests/functional/flakes/flakes.sh @@ -220,6 +220,13 @@ nix store gc nix registry list --flake-registry "file://$registry" --refresh | grepQuiet flake3 mv "$registry.tmp" "$registry" +# Ensure that locking ignores the user registry. +mkdir -p "$TEST_HOME/.config/nix" +ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json" +nix flake metadata --flake-registry '' flake1 +expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries" +rm "$TEST_HOME/.config/nix/registry.json" + # Test whether flakes are registered as GC roots for offline use. # FIXME: use tarballs rather than git. rm -rf "$TEST_HOME/.cache" From 709f05989d0d89598e37591474387b16b03bb674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 25 Apr 2025 10:10:06 +0200 Subject: [PATCH 11/29] tests/flakes: add regression test for resolving user flakes (cherry picked from commit 6405d6822d0139ea02123919eb40d0b57786b7f9) --- tests/functional/flakes/flakes.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh index aac505d41..72fe79838 100755 --- a/tests/functional/flakes/flakes.sh +++ b/tests/functional/flakes/flakes.sh @@ -266,6 +266,7 @@ nix registry add user-flake2 "git+file://$percentEncodedFlake2Dir" [[ $(nix --flake-registry "" registry list | wc -l) == 2 ]] nix --flake-registry "" registry list | grepQuietInverse '^global' # nothing in global registry nix --flake-registry "" registry list | grepQuiet '^user' +nix flake metadata --flake-registry "" user-flake1 | grepQuiet 'URL:.*flake1.*' nix registry remove user-flake1 nix registry remove user-flake2 [[ $(nix registry list | wc -l) == 4 ]] From 1c9e94789e6a4791674711479e07ab171c473315 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Fri, 25 Apr 2025 13:35:16 +0300 Subject: [PATCH 12/29] libutil: Add missing format arguments to UsageError ctor Once again found by an automated migration to `std::format`. I've tested that boost::format works fine with `std::string_view` arguments. (cherry picked from commit 9fff868e39ddbeeee4c1aece452cf0d9c9cc8019) --- src/libutil-tests/file-content-address.cc | 15 +++++++++++---- src/libutil/file-content-address.cc | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/libutil-tests/file-content-address.cc b/src/libutil-tests/file-content-address.cc index 5cdf94edc..92c6059a4 100644 --- a/src/libutil-tests/file-content-address.cc +++ b/src/libutil-tests/file-content-address.cc @@ -1,3 +1,4 @@ +#include #include #include "nix/util/file-content-address.hh" @@ -26,8 +27,11 @@ TEST(FileSerialisationMethod, testRoundTripPrintParse_2) { } } -TEST(FileSerialisationMethod, testParseFileSerialisationMethodOptException) { - EXPECT_THROW(parseFileSerialisationMethod("narwhal"), UsageError); +TEST(FileSerialisationMethod, testParseFileSerialisationMethodOptException) +{ + EXPECT_THAT( + []() { parseFileSerialisationMethod("narwhal"); }, + testing::ThrowsMessage(testing::HasSubstr("narwhal"))); } /* ---------------------------------------------------------------------------- @@ -54,8 +58,11 @@ TEST(FileIngestionMethod, testRoundTripPrintParse_2) { } } -TEST(FileIngestionMethod, testParseFileIngestionMethodOptException) { - EXPECT_THROW(parseFileIngestionMethod("narwhal"), UsageError); +TEST(FileIngestionMethod, testParseFileIngestionMethodOptException) +{ + EXPECT_THAT( + []() { parseFileIngestionMethod("narwhal"); }, + testing::ThrowsMessage(testing::HasSubstr("narwhal"))); } } diff --git a/src/libutil/file-content-address.cc b/src/libutil/file-content-address.cc index 673e1dff1..142bc70d5 100644 --- a/src/libutil/file-content-address.cc +++ b/src/libutil/file-content-address.cc @@ -22,7 +22,7 @@ FileSerialisationMethod parseFileSerialisationMethod(std::string_view input) if (ret) return *ret; else - throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`"); + throw UsageError("Unknown file serialiation method '%s', expect `flat` or `nar`", input); } @@ -35,7 +35,7 @@ FileIngestionMethod parseFileIngestionMethod(std::string_view input) if (ret) return static_cast(*ret); else - throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`"); + throw UsageError("Unknown file ingestion method '%s', expect `flat`, `nar`, or `git`", input); } } From 3c5d7822c5c8f9bbbf903de3e38f82f882aed1ef Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 27 Apr 2025 16:25:50 -0400 Subject: [PATCH 13/29] Add a couple markers for injecting new updated content --- doc/manual/source/SUMMARY.md.in | 2 +- doc/manual/source/release-notes-determinate/changes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/source/SUMMARY.md.in b/doc/manual/source/SUMMARY.md.in index 1492abb62..8cce1113c 100644 --- a/doc/manual/source/SUMMARY.md.in +++ b/doc/manual/source/SUMMARY.md.in @@ -127,7 +127,7 @@ - [Experimental Features](development/experimental-features.md) - [Contributing](development/contributing.md) - [Determinate Nix Release Notes](release-notes-determinate/index.md) - - [Changes between Nix and Determinate Nix](release-notes-determinate/changes.md) + - [Changes between Nix and Determinate Nix](release-notes-determinate/changes.md) - [Release 3.4.0 (2025-04-25)](release-notes-determinate/rl-3.4.0.md) - [Release 3.3.0 (2025-04-11)](release-notes-determinate/rl-3.3.0.md) - [Release 3.1.0 (2025-03-27)](release-notes-determinate/rl-3.1.0.md) diff --git a/doc/manual/source/release-notes-determinate/changes.md b/doc/manual/source/release-notes-determinate/changes.md index f0cc1af54..5816ef871 100644 --- a/doc/manual/source/release-notes-determinate/changes.md +++ b/doc/manual/source/release-notes-determinate/changes.md @@ -1,6 +1,6 @@ # Changes between Nix and Determinate Nix -This section lists the differences between upstream Nix 2.24 and Determinate Nix 3.4.0. +This section lists the differences between upstream Nix 2.24 and Determinate Nix 3.4.0. * In Determinate Nix, flakes are stable. You no longer need to enable the `flakes` experimental feature. From 25ef7a19566aff71d12640cfcf2cbdae068ffe34 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 27 Apr 2025 17:08:41 -0400 Subject: [PATCH 14/29] Automatically generate release notes draft during proposal --- .github/release-notes.sh | 63 +++++++++++++++++++++++++++ .github/workflows/propose-release.yml | 2 + 2 files changed, 65 insertions(+) create mode 100755 .github/release-notes.sh diff --git a/.github/release-notes.sh b/.github/release-notes.sh new file mode 100755 index 000000000..641426b36 --- /dev/null +++ b/.github/release-notes.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +scratch=$(mktemp -d -t tmp.XXXXXXXXXX) +finish() { + rm -rf "$scratch" +} +trap finish EXIT + +DATE=$(date +%Y-%m-%d) +DETERMINATE_NIX_VERSION=$(cat .version-determinate) +TAG_NAME="v${DETERMINATE_NIX_VERSION}" +NIX_VERSION=$(cat .version) +NIX_VERSION_MAJOR_MINOR=$(echo "$NIX_VERSION" | cut -d. -f1,2) +GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-DeterminateSystems/nix-src}" + +gh api "/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \ + -f "tag_name=${TAG_NAME}" > "$scratch/notes.json" + +trim_trailing_newlines() { + tac \ + | awk 'flag {print} {if(NF) flag=1}' \ + | tac +} + +linkify_gh() { + sed \ + -e 's#\(https://github.com/DeterminateSystems/nix-src/\(pull\|issue\)/\([[:digit:]]\+\)\)#[dnix\#\3](\1)#' \ + -e 's#\(https://github.com/DeterminateSystems/nix-src/compare/\([^ ]\+\)\)#[\2](\1)#' +} + +( + cat doc/manual/source/release-notes-determinate/changes.md \ + | sed 's/^.*\(\)$/This section lists the differences between upstream Nix '"$NIX_VERSION_MAJOR_MINOR"' and Determinate Nix '"$DETERMINATE_NIX_VERSION"'.\1/' \ + + printf "\n\n" "$DETERMINATE_NIX_VERSION" + cat "$scratch/notes.json" \ + | jq -r .body \ + | grep -v '^#' \ + | grep -v "Full Changelog" \ + | trim_trailing_newlines \ + | sed -e 's/^\* /\n* /' \ + | linkify_gh +) > "$scratch/changes.md" + +( + printf "# Release %s (%s)\n\n" \ + "$DETERMINATE_NIX_VERSION" \ + "$DATE" + printf "* Based on [upstream Nix %s](../release-notes/rl-%s.md).\n\n" \ + "$NIX_VERSION" \ + "$NIX_VERSION_MAJOR_MINOR" + + cat "$scratch/notes.json" | jq -r .body | linkify_gh +) > "$scratch/rl.md" + +( + cat doc/manual/source/SUMMARY.md.in \ + | sed 's/\(\)$/\1\n - [Release '"$DETERMINATE_NIX_VERSION"' ('"$DATE"')](release-notes-determinate\/rl-'"$DETERMINATE_NIX_VERSION"'.md)/' +) > "$scratch/summary.md" + +mv "$scratch/changes.md" doc/manual/source/release-notes-determinate/changes.md +mv "$scratch/rl.md" "doc/manual/source/release-notes-determinate/rl-${DETERMINATE_NIX_VERSION}.md" +mv "$scratch/summary.md" doc/manual/source/SUMMARY.md.in diff --git a/.github/workflows/propose-release.yml b/.github/workflows/propose-release.yml index 8b897072c..c01167994 100644 --- a/.github/workflows/propose-release.yml +++ b/.github/workflows/propose-release.yml @@ -26,4 +26,6 @@ jobs: extra-commands-early: | echo ${{ inputs.version }} > .version-determinate git add .version-determinate + ./.github/release-notes.sh + git add doc git commit -m "Set .version-determinate to ${{ inputs.version }}" || true From e057d0d67c08193e7854056f5631c9f1c86c123e Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 27 Apr 2025 17:08:48 -0400 Subject: [PATCH 15/29] Drop upstream CODEOWNERS --- .github/CODEOWNERS | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index a9ca74c17..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,26 +0,0 @@ -# Pull requests concerning the listed files will automatically invite the respective maintainers as reviewers. -# This file is not used for denoting any kind of ownership, but is merely a tool for handling notifications. -# -# Merge permissions are required for maintaining an entry in this file. -# For documentation on this mechanism, see https://help.github.com/articles/about-codeowners/ - -# Default reviewers if nothing else matches -* @edolstra - -# This file -.github/CODEOWNERS @edolstra - -# Documentation of built-in functions -src/libexpr/primops.cc @roberth @fricklerhandwerk - -# Documentation of settings -src/libexpr/eval-settings.hh @fricklerhandwerk -src/libstore/globals.hh @fricklerhandwerk - -# Documentation -doc/manual @fricklerhandwerk -maintainers/*.md @fricklerhandwerk -src/**/*.md @fricklerhandwerk - -# Libstore layer -/src/libstore @ericson2314 From 81350e1ffccc4ce543dc78bf248f9d3ae41dcbb2 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 27 Apr 2025 17:08:48 -0400 Subject: [PATCH 16/29] Update our issue and PR templates to be "us" --- .github/ISSUE_TEMPLATE/bug_report.md | 21 +++++++--------- .github/ISSUE_TEMPLATE/feature_request.md | 19 ++++++-------- .github/ISSUE_TEMPLATE/installer.md | 23 +++++++---------- .../ISSUE_TEMPLATE/missing_documentation.md | 19 ++++++-------- .github/PULL_REQUEST_TEMPLATE.md | 25 ------------------- .github/STALE-BOT.md | 25 +++++-------------- 6 files changed, 38 insertions(+), 94 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a5005f8a0..58ef1690f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Report unexpected or incorrect behaviour -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- ## Describe the bug @@ -32,7 +31,9 @@ assignees: '' ## Metadata - + + + ## Additional context @@ -42,13 +43,9 @@ assignees: '' -- [ ] checked [latest Nix manual] \([source]) +- [ ] checked [latest Determinate Nix manual] \([source]) - [ ] checked [open bug issues and pull requests] for possible duplicates -[latest Nix manual]: https://nixos.org/manual/nix/unstable/ -[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source -[open bug issues and pull requests]: https://github.com/NixOS/nix/labels/bug - ---- - -Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc). +[latest Determinate Nix manual]: https://manual.determinate.systems/ +[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source +[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c75a46951..345a05c53 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest a new feature -title: '' +title: "" labels: feature -assignees: '' - +assignees: "" --- ## Is your feature request related to a problem? @@ -27,13 +26,9 @@ assignees: '' -- [ ] checked [latest Nix manual] \([source]) -- [ ] checked [open feature issues and pull requests] for possible duplicates +- [ ] checked [latest Determinate Nix manual] \([source]) +- [ ] checked [open bug issues and pull requests] for possible duplicates -[latest Nix manual]: https://nixos.org/manual/nix/unstable/ -[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source -[open feature issues and pull requests]: https://github.com/NixOS/nix/labels/feature - ---- - -Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc). +[latest Determinate Nix manual]: https://manual.determinate.systems/ +[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source +[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug diff --git a/.github/ISSUE_TEMPLATE/installer.md b/.github/ISSUE_TEMPLATE/installer.md index ed5e1ce87..9bf6541c7 100644 --- a/.github/ISSUE_TEMPLATE/installer.md +++ b/.github/ISSUE_TEMPLATE/installer.md @@ -1,18 +1,17 @@ --- name: Installer issue about: Report problems with installation -title: '' +title: "" labels: installer -assignees: '' - +assignees: "" --- ## Platform - + -- [ ] Linux: - [ ] macOS +- [ ] Linux: - [ ] WSL ## Additional information @@ -35,13 +34,9 @@ assignees: '' -- [ ] checked [latest Nix manual] \([source]) -- [ ] checked [open installer issues and pull requests] for possible duplicates +- [ ] checked [latest Determinate Nix manual] \([source]) +- [ ] checked [open bug issues and pull requests] for possible duplicates -[latest Nix manual]: https://nixos.org/manual/nix/unstable/ -[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source -[open installer issues and pull requests]: https://github.com/NixOS/nix/labels/installer - ---- - -Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc). +[latest Determinate Nix manual]: https://manual.determinate.systems/ +[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source +[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug diff --git a/.github/ISSUE_TEMPLATE/missing_documentation.md b/.github/ISSUE_TEMPLATE/missing_documentation.md index 6c334b722..eaa6b1170 100644 --- a/.github/ISSUE_TEMPLATE/missing_documentation.md +++ b/.github/ISSUE_TEMPLATE/missing_documentation.md @@ -1,10 +1,9 @@ --- name: Missing or incorrect documentation about: Help us improve the reference manual -title: '' +title: "" labels: documentation -assignees: '' - +assignees: "" --- ## Problem @@ -19,13 +18,9 @@ assignees: '' -- [ ] checked [latest Nix manual] \([source]) -- [ ] checked [open documentation issues and pull requests] for possible duplicates +- [ ] checked [latest Determinate Nix manual] \([source]) +- [ ] checked [open bug issues and pull requests] for possible duplicates -[latest Nix manual]: https://nixos.org/manual/nix/unstable/ -[source]: https://github.com/NixOS/nix/tree/master/doc/manual/source -[open documentation issues and pull requests]: https://github.com/NixOS/nix/labels/documentation - ---- - -Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc). +[latest Determinate Nix manual]: https://manual.determinate.systems/ +[source]: https://github.com/DeterminateSystems/nix-src/tree/detsys-main/doc/manual/source +[open bug issues and pull requests]: https://github.com/DeterminateSystems/nix-src/labels/bug diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c6843d86f..d3e1f8177 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,22 +1,3 @@ - - ## Motivation @@ -30,9 +11,3 @@ so you understand the process and the expectations. - ---- - -Add :+1: to [pull requests you find important](https://github.com/NixOS/nix/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc). - -The Nix maintainer team uses a [GitHub project board](https://github.com/orgs/NixOS/projects/19) to [schedule and track reviews](https://github.com/NixOS/nix/tree/master/maintainers#project-board-protocol). diff --git a/.github/STALE-BOT.md b/.github/STALE-BOT.md index 383717bfc..281d0f79a 100644 --- a/.github/STALE-BOT.md +++ b/.github/STALE-BOT.md @@ -2,34 +2,21 @@ - Thanks for your contribution! - To remove the stale label, just leave a new comment. -- _How to find the right people to ping?_ → [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.) -- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/) or on [Matrix - #nix:nixos.org](https://matrix.to/#/#nix:nixos.org). +- You can always ask for help on [Discord](https://determinate.systems/discord). ## Suggestions for PRs -1. GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. If you have addressed the reviews you can [officially ask for a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else. -2. If it is unfinished but you plan to finish it, please mark it as a draft. -3. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work. -4. To get things rolling again, rebase the PR against the target branch and address valid comments. -5. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604). -6. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions. +1. If it is unfinished but you plan to finish it, please mark it as a draft. +1. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work. +1. To get things rolling again, rebase the PR against the target branch and address valid comments. +1. If you need a review to move forward, ask in [Discord](https://determinate.systems/discord). ## Suggestions for issues 1. If it is resolved (either for you personally, or in general), please consider closing it. 2. If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. -3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [our Discourse Forum](https://discourse.nixos.org/). -4. As with all open source projects, your best option is to submit a Pull Request that addresses this issue. We :heart: this attitude! +3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [Discord](https://determinate.systems/discord). **Memorandum on closing issues** Don't be afraid to close an issue that holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. - -## Useful GitHub search queries - -- [Open PRs with any stale-bot interaction](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+) -- [Open PRs with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22) -- [Open PRs with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+) -- [Open Issues with any stale-bot interaction](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+) -- [Open Issues with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22+) -- [Open Issues with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+) From ce1cca8ebdc6433c30a0150e71352ec6b496a188 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 27 Apr 2025 17:08:48 -0400 Subject: [PATCH 17/29] Allow useless cat. --- .github/release-notes.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/release-notes.sh b/.github/release-notes.sh index 641426b36..e567e0225 100755 --- a/.github/release-notes.sh +++ b/.github/release-notes.sh @@ -1,5 +1,10 @@ #!/bin/sh +# SC2002 disables "useless cat" warnings. +# I prefer pipelines that start with an explicit input, and go from there. +# Overly fussy. +# shellcheck disable=SC2002 + scratch=$(mktemp -d -t tmp.XXXXXXXXXX) finish() { rm -rf "$scratch" From 9ba32a29817a10de103b0e30c4840eec5e0c0ae1 Mon Sep 17 00:00:00 2001 From: Philipp Otterbein Date: Mon, 28 Apr 2025 00:46:44 +0200 Subject: [PATCH 18/29] allocate SimpleLogger before forking (cherry picked from commit 4e95f662db38d219609361697ae48a2b02352c20) --- src/libutil/unix/processes.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libutil/unix/processes.cc b/src/libutil/unix/processes.cc index 198243c20..0d50fc303 100644 --- a/src/libutil/unix/processes.cc +++ b/src/libutil/unix/processes.cc @@ -202,6 +202,7 @@ static int childEntry(void * arg) pid_t startProcess(std::function fun, const ProcessOptions & options) { + auto newLogger = makeSimpleLogger(); ChildWrapperFunction wrapper = [&] { if (!options.allowVfork) { /* Set a simple logger, while releasing (not destroying) @@ -210,7 +211,7 @@ pid_t startProcess(std::function fun, const ProcessOptions & options) ~ProgressBar() tries to join a thread that doesn't exist. */ logger.release(); - logger = makeSimpleLogger(); + logger = std::move(newLogger); } try { #ifdef __linux__ From 5a87809b25f862084aaf4ed43483c49aebf86899 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 28 Apr 2025 10:29:49 -0400 Subject: [PATCH 19/29] Update .github/release-notes.sh Co-authored-by: gustavderdrache --- .github/release-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-notes.sh b/.github/release-notes.sh index e567e0225..18dc7ea2f 100755 --- a/.github/release-notes.sh +++ b/.github/release-notes.sh @@ -29,7 +29,7 @@ trim_trailing_newlines() { linkify_gh() { sed \ - -e 's#\(https://github.com/DeterminateSystems/nix-src/\(pull\|issue\)/\([[:digit:]]\+\)\)#[dnix\#\3](\1)#' \ + -e 's!\(https://github.com/DeterminateSystems/nix-src/\(pull\|issue\)/\([[:digit:]]\+\)\)![DeterminateSystems/nix-src#\3](\1)!' \ -e 's#\(https://github.com/DeterminateSystems/nix-src/compare/\([^ ]\+\)\)#[\2](\1)#' } From e2cce0e02645b8a4d6822786efe979dbe71e0971 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 28 Apr 2025 12:42:48 -0400 Subject: [PATCH 20/29] Update .github/release-notes.sh Co-authored-by: gustavderdrache --- .github/release-notes.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/release-notes.sh b/.github/release-notes.sh index 18dc7ea2f..558f06030 100755 --- a/.github/release-notes.sh +++ b/.github/release-notes.sh @@ -22,9 +22,9 @@ gh api "/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \ -f "tag_name=${TAG_NAME}" > "$scratch/notes.json" trim_trailing_newlines() { - tac \ - | awk 'flag {print} {if(NF) flag=1}' \ - | tac + local text + text="$(cat)" + echo -n "${text//$'\n'}" } linkify_gh() { From e44d4b7ec0b335eb39c292dcbdab0be68e9e8819 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 28 Apr 2025 12:59:02 -0400 Subject: [PATCH 21/29] Update .github/release-notes.sh --- .github/release-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-notes.sh b/.github/release-notes.sh index 558f06030..3fe3f6b17 100755 --- a/.github/release-notes.sh +++ b/.github/release-notes.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # SC2002 disables "useless cat" warnings. # I prefer pipelines that start with an explicit input, and go from there. From 2e2d795b46e5373f16590406c104523a3e1d0fa0 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 28 Apr 2025 14:52:01 -0300 Subject: [PATCH 22/29] Remove trailing slash in Zero to Nix URL --- src/nix-channel/nix-channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc index a6ca6f711..3d708898b 100644 --- a/src/nix-channel/nix-channel.cc +++ b/src/nix-channel/nix-channel.cc @@ -166,7 +166,7 @@ static int main_nix_channel(int argc, char ** argv) { warn( "nix-channel is deprecated in favor of flakes in Determinate Nix. \ -For a guide on Nix flakes, see: https://zero-to-nix.com/. \ +For a guide on Nix flakes, see: https://zero-to-nix.com. \ For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34."); { From 506f489dae5279257893ee9b8735a2ad49ac1e65 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 28 Apr 2025 15:04:29 -0300 Subject: [PATCH 23/29] Remove other trailing slash --- src/libexpr/eval-settings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc index 8fbe94aef..2676c7b80 100644 --- a/src/libexpr/eval-settings.cc +++ b/src/libexpr/eval-settings.cc @@ -90,7 +90,7 @@ std::string EvalSettings::resolvePseudoUrl(std::string_view url) warnOnce(haveWarned, "Channels are deprecated in favor of flakes in Determinate Nix. " "Instead of '%s', use '%s'. " - "For a guide on Nix flakes, see: https://zero-to-nix.com/. " + "For a guide on Nix flakes, see: https://zero-to-nix.com. " "For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.", url, realUrl); return realUrl; From 71e735385a7696103610891020fde9c6205f4391 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 28 Apr 2025 15:39:38 -0300 Subject: [PATCH 24/29] Change language around guide --- src/libexpr/eval-settings.cc | 2 +- src/nix-channel/nix-channel.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc index 2676c7b80..dd498fdf2 100644 --- a/src/libexpr/eval-settings.cc +++ b/src/libexpr/eval-settings.cc @@ -90,7 +90,7 @@ std::string EvalSettings::resolvePseudoUrl(std::string_view url) warnOnce(haveWarned, "Channels are deprecated in favor of flakes in Determinate Nix. " "Instead of '%s', use '%s'. " - "For a guide on Nix flakes, see: https://zero-to-nix.com. " + "See https://zero-to-nix.com for a guide to Nix flakes. " "For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.", url, realUrl); return realUrl; diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc index 3d708898b..2ad88dbbe 100644 --- a/src/nix-channel/nix-channel.cc +++ b/src/nix-channel/nix-channel.cc @@ -166,7 +166,7 @@ static int main_nix_channel(int argc, char ** argv) { warn( "nix-channel is deprecated in favor of flakes in Determinate Nix. \ -For a guide on Nix flakes, see: https://zero-to-nix.com. \ +See https://zero-to-nix.com for a guide to Nix flakes. \ For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34."); { From de24714a909054167956ceb6324d6f98d2eacc34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:54:52 +0000 Subject: [PATCH 25/29] Prepare release v3.4.1 From 7cf6869f98cd38e08c1331e634ab3a2351f9ec18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:54:55 +0000 Subject: [PATCH 26/29] Set .version-determinate to 3.4.1 --- .version-determinate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version-determinate b/.version-determinate index 18091983f..47b322c97 100644 --- a/.version-determinate +++ b/.version-determinate @@ -1 +1 @@ -3.4.0 +3.4.1 From dc7d270df4db780fe3e334412e7867bd533165d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 13:24:57 +0000 Subject: [PATCH 27/29] Prepare release v3.4.2 From 21ff15bb2ef7996c2d5e299a93ca8908987b5822 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 13:25:03 +0000 Subject: [PATCH 28/29] Set .version-determinate to 3.4.2 --- .version-determinate | 2 +- doc/manual/source/SUMMARY.md.in | 1 + doc/manual/source/release-notes-determinate/changes.md | 4 +++- doc/manual/source/release-notes-determinate/rl-3.4.2.md | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 doc/manual/source/release-notes-determinate/rl-3.4.2.md diff --git a/.version-determinate b/.version-determinate index 47b322c97..4d9d11cf5 100644 --- a/.version-determinate +++ b/.version-determinate @@ -1 +1 @@ -3.4.1 +3.4.2 diff --git a/doc/manual/source/SUMMARY.md.in b/doc/manual/source/SUMMARY.md.in index 8cce1113c..7b9831734 100644 --- a/doc/manual/source/SUMMARY.md.in +++ b/doc/manual/source/SUMMARY.md.in @@ -128,6 +128,7 @@ - [Contributing](development/contributing.md) - [Determinate Nix Release Notes](release-notes-determinate/index.md) - [Changes between Nix and Determinate Nix](release-notes-determinate/changes.md) + - [Release 3.4.2 (2025-05-05)](release-notes-determinate/rl-3.4.2.md) - [Release 3.4.0 (2025-04-25)](release-notes-determinate/rl-3.4.0.md) - [Release 3.3.0 (2025-04-11)](release-notes-determinate/rl-3.3.0.md) - [Release 3.1.0 (2025-03-27)](release-notes-determinate/rl-3.1.0.md) diff --git a/doc/manual/source/release-notes-determinate/changes.md b/doc/manual/source/release-notes-determinate/changes.md index 5816ef871..b88ef57c5 100644 --- a/doc/manual/source/release-notes-determinate/changes.md +++ b/doc/manual/source/release-notes-determinate/changes.md @@ -1,6 +1,6 @@ # Changes between Nix and Determinate Nix -This section lists the differences between upstream Nix 2.24 and Determinate Nix 3.4.0. +This section lists the differences between upstream Nix 2.28 and Determinate Nix 3.4.2. * In Determinate Nix, flakes are stable. You no longer need to enable the `flakes` experimental feature. @@ -15,3 +15,5 @@ This section lists the differences between upstream Nix 2.24 and Determinate Nix * Using indirect flake references and implicit inputs is deprecated, see: https://github.com/DeterminateSystems/nix-src/issues/37 * Warnings around "dirty trees" are updated to reduce "dirty" jargon, and now refers to "uncommitted changes". + + diff --git a/doc/manual/source/release-notes-determinate/rl-3.4.2.md b/doc/manual/source/release-notes-determinate/rl-3.4.2.md new file mode 100644 index 000000000..8acabd442 --- /dev/null +++ b/doc/manual/source/release-notes-determinate/rl-3.4.2.md @@ -0,0 +1,4 @@ +# Release 3.4.2 (2025-05-05) + +* Based on [upstream Nix 2.28.3](../release-notes/rl-2.28.md). + From eea5988e6d0db3f2f40acca97a23a01510589c80 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 5 May 2025 10:23:25 -0400 Subject: [PATCH 29/29] Only run the test step after build completes This prevents the test step from duplicating work from the build step. This minimizes contention on our macOS build infra most significantly, but the others too. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 607a31a6b..437be278a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,7 @@ jobs: path: ./tarball/*.xz test: if: ${{ inputs.if && inputs.run_tests}} + needs: build strategy: fail-fast: false runs-on: ${{ inputs.os }}