From 1d0dbda2aed651f3a2cea9d563c768023f9db496 Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 14 Aug 2025 00:22:24 +0000 Subject: [PATCH] libexpr/primops: crank up our user agent See https://github.com/NixOS/nixpkgs/commit/fa0cba1c398faad0b810555daea3bfeb05719a8c. We'll see how dependent nixpkgs will grow on newer and features and how feasible it is to continue using Nix 2.3. The compat code that will be immediately removed looks like it doesn't actually affect Nix 2.3.18 which already had some fixes backported: - https://github.com/NixOS/nixpkgs/pull/433101. Some features of fileset won't work anymore, but fileset is disallowed in nixpkgs anyways. The documentation workaround only affects Nix < 2.3.5. - https://github.com/NixOS/nixpkgs/pull/433055. The fix for NIX_ATTRS_* has been backported to Nix 2.3.18. --- src/libexpr/primops.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index b65433d45b02..d5bb91f9ccf6 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -2174,7 +2174,10 @@ void EvalState::createBaseEnv() addConstant("__currentSystem", v); } - mkString(v, nixVersion); + /* Set our user agent string, so we can evaluate Nixpkgs. + See also . + */ + mkString(v, "2.18.3-tvl-cppnix-2.3-actual"); addConstant("__nixVersion", v); mkString(v, store->storeDir);