lol

nixVersions.git: 2025-04-07 -> 2025-04-09

This adds the nix-fetchers-c library (C API) which may be of interest.
Technically, since 2.28 is not packaged with these files at this time,
the conditionals are redundant, but I'd like this commit to serve as a
blueprint for future updates, and I'd like to keep options open for
2.28 packaging.

+93 -30
+3 -3
pkgs/tools/package-management/nix/default.nix
··· 189 189 }; 190 190 191 191 nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec { 192 - version = "2.29pre20250407_${lib.substring 0 8 src.rev}"; 192 + version = "2.29pre20250409_${lib.substring 0 8 src.rev}"; 193 193 inherit (self.nix_2_24.meta) maintainers; 194 194 otherSplices = generateSplicesForNixComponents "nixComponents_git"; 195 195 src = fetchFromGitHub { 196 196 owner = "NixOS"; 197 197 repo = "nix"; 198 - rev = "73d3159ba0b4b711c1f124a587f16e2486d685d7"; 199 - hash = "sha256-9wJXUGqXIqMjNyKWJKCcxrDHM/KxDkvJMwo6S3s+WuM="; 198 + rev = "e76bbe413e86e3208bb9824e339d59af25327101"; 199 + hash = "sha256-Aqnj5+sA7B4ZRympuyfWPPK83iomKHEHMYhlwslI8iA="; 200 200 }; 201 201 }; 202 202
+3
pkgs/tools/package-management/nix/modular/packaging/components.nix
··· 201 201 } 202 202 ); 203 203 204 + whenAtLeast = v: thing: if lib.versionAtLeast version v then thing else null; 205 + 204 206 in 205 207 206 208 # This becomes the pkgs.nixComponents attribute set ··· 336 338 nix-store-tests = callPackage ../src/libstore-tests/package.nix { }; 337 339 338 340 nix-fetchers = callPackage ../src/libfetchers/package.nix { }; 341 + ${whenAtLeast "2.29pre" "nix-fetchers-c"} = callPackage ../src/libfetchers-c/package.nix { }; 339 342 nix-fetchers-tests = callPackage ../src/libfetchers-tests/package.nix { }; 340 343 341 344 nix-expr = callPackage ../src/libexpr/package.nix { };
+37 -22
pkgs/tools/package-management/nix/modular/packaging/everything.nix
··· 6 6 7 7 maintainers, 8 8 9 + version, 10 + 9 11 nix-util, 10 12 nix-util-c, 11 13 nix-util-tests, ··· 15 17 nix-store-tests, 16 18 17 19 nix-fetchers, 20 + nix-fetchers-c, 18 21 nix-fetchers-tests, 19 22 20 23 nix-expr, ··· 63 66 nix-cmd 64 67 ; 65 68 } 66 - // lib.optionalAttrs 67 - (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) 68 - { 69 - # Currently fails in static build 70 - inherit 71 - nix-perl-bindings 72 - ; 73 - }; 69 + // lib.optionalAttrs (lib.versionAtLeast version "2.29pre") { 70 + inherit 71 + nix-fetchers-c 72 + ; 73 + } 74 + // 75 + lib.optionalAttrs 76 + (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) 77 + { 78 + # Currently fails in static build 79 + inherit 80 + nix-perl-bindings 81 + ; 82 + }; 74 83 75 84 devdoc = buildEnv { 76 85 name = "nix-${nix-cli.version}-devdoc"; ··· 225 234 "out" 226 235 "man" 227 236 ]; 228 - pkgConfigModules = [ 229 - "nix-cmd" 230 - "nix-expr" 231 - "nix-expr-c" 232 - "nix-fetchers" 233 - "nix-flake" 234 - "nix-flake-c" 235 - "nix-main" 236 - "nix-main-c" 237 - "nix-store" 238 - "nix-store-c" 239 - "nix-util" 240 - "nix-util-c" 241 - ]; 237 + pkgConfigModules = 238 + [ 239 + "nix-cmd" 240 + "nix-expr" 241 + "nix-expr-c" 242 + "nix-fetchers" 243 + ] 244 + ++ lib.optionals (lib.versionAtLeast version "2.29pre") [ 245 + "nix-fetchers-c" 246 + ] 247 + ++ [ 248 + "nix-flake" 249 + "nix-flake-c" 250 + "nix-main" 251 + "nix-main-c" 252 + "nix-store" 253 + "nix-store-c" 254 + "nix-util" 255 + "nix-util-c" 256 + ]; 242 257 }; 243 258 244 259 })
+34
pkgs/tools/package-management/nix/modular/src/libfetchers-c/package.nix
··· 1 + { 2 + lib, 3 + mkMesonLibrary, 4 + 5 + nix-store-c, 6 + nix-expr-c, 7 + nix-util-c, 8 + nix-fetchers, 9 + 10 + # Configuration Options 11 + 12 + version, 13 + }: 14 + 15 + mkMesonLibrary (finalAttrs: { 16 + pname = "nix-fetchers-c"; 17 + inherit version; 18 + 19 + workDir = ./.; 20 + 21 + propagatedBuildInputs = [ 22 + nix-util-c 23 + nix-expr-c 24 + nix-store-c 25 + nix-fetchers 26 + ]; 27 + 28 + mesonFlags = [ ]; 29 + 30 + meta = { 31 + platforms = lib.platforms.unix ++ lib.platforms.windows; 32 + }; 33 + 34 + })
+4
pkgs/tools/package-management/nix/modular/src/libfetchers-tests/package.nix
··· 5 5 mkMesonExecutable, 6 6 7 7 nix-fetchers, 8 + nix-fetchers-c, 8 9 nix-store-test-support, 9 10 10 11 libgit2, ··· 30 31 nix-store-test-support 31 32 rapidcheck 32 33 gtest 34 + ] 35 + ++ lib.optionals (lib.versionAtLeast version "2.29pre") [ 36 + nix-fetchers-c 33 37 ] 34 38 ++ lib.optionals (lib.versionAtLeast version "2.27") [ 35 39 libgit2
+12 -5
pkgs/tools/package-management/nix/modular/src/libflake-c/package.nix
··· 4 4 5 5 nix-store-c, 6 6 nix-expr-c, 7 + nix-fetchers-c, 7 8 nix-flake, 8 9 9 10 # Configuration Options ··· 17 18 18 19 workDir = ./.; 19 20 20 - propagatedBuildInputs = [ 21 - nix-expr-c 22 - nix-store-c 23 - nix-flake 24 - ]; 21 + propagatedBuildInputs = 22 + [ 23 + nix-expr-c 24 + nix-store-c 25 + ] 26 + ++ lib.optionals (lib.versionAtLeast version "2.29pre") [ 27 + nix-fetchers-c 28 + ] 29 + ++ [ 30 + nix-flake 31 + ]; 25 32 26 33 mesonFlags = [ 27 34 ];