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.
This commit is contained in:
Robert Hensing
2025-04-09 16:15:40 +02:00
parent d1adddbb94
commit cf5f2ec29e
6 changed files with 93 additions and 30 deletions
@@ -189,14 +189,14 @@ lib.makeExtensible (
};
nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec {
version = "2.29pre20250407_${lib.substring 0 8 src.rev}";
version = "2.29pre20250409_${lib.substring 0 8 src.rev}";
inherit (self.nix_2_24.meta) maintainers;
otherSplices = generateSplicesForNixComponents "nixComponents_git";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "73d3159ba0b4b711c1f124a587f16e2486d685d7";
hash = "sha256-9wJXUGqXIqMjNyKWJKCcxrDHM/KxDkvJMwo6S3s+WuM=";
rev = "e76bbe413e86e3208bb9824e339d59af25327101";
hash = "sha256-Aqnj5+sA7B4ZRympuyfWPPK83iomKHEHMYhlwslI8iA=";
};
};
@@ -201,6 +201,8 @@ let
}
);
whenAtLeast = v: thing: if lib.versionAtLeast version v then thing else null;
in
# This becomes the pkgs.nixComponents attribute set
@@ -336,6 +338,7 @@ in
nix-store-tests = callPackage ../src/libstore-tests/package.nix { };
nix-fetchers = callPackage ../src/libfetchers/package.nix { };
${whenAtLeast "2.29pre" "nix-fetchers-c"} = callPackage ../src/libfetchers-c/package.nix { };
nix-fetchers-tests = callPackage ../src/libfetchers-tests/package.nix { };
nix-expr = callPackage ../src/libexpr/package.nix { };
@@ -6,6 +6,8 @@
maintainers,
version,
nix-util,
nix-util-c,
nix-util-tests,
@@ -15,6 +17,7 @@
nix-store-tests,
nix-fetchers,
nix-fetchers-c,
nix-fetchers-tests,
nix-expr,
@@ -63,14 +66,20 @@ let
nix-cmd
;
}
// lib.optionalAttrs
(!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform)
{
# Currently fails in static build
inherit
nix-perl-bindings
;
};
// lib.optionalAttrs (lib.versionAtLeast version "2.29pre") {
inherit
nix-fetchers-c
;
}
//
lib.optionalAttrs
(!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform)
{
# Currently fails in static build
inherit
nix-perl-bindings
;
};
devdoc = buildEnv {
name = "nix-${nix-cli.version}-devdoc";
@@ -225,20 +234,26 @@ stdenv.mkDerivation (finalAttrs: {
"out"
"man"
];
pkgConfigModules = [
"nix-cmd"
"nix-expr"
"nix-expr-c"
"nix-fetchers"
"nix-flake"
"nix-flake-c"
"nix-main"
"nix-main-c"
"nix-store"
"nix-store-c"
"nix-util"
"nix-util-c"
];
pkgConfigModules =
[
"nix-cmd"
"nix-expr"
"nix-expr-c"
"nix-fetchers"
]
++ lib.optionals (lib.versionAtLeast version "2.29pre") [
"nix-fetchers-c"
]
++ [
"nix-flake"
"nix-flake-c"
"nix-main"
"nix-main-c"
"nix-store"
"nix-store-c"
"nix-util"
"nix-util-c"
];
};
})
@@ -0,0 +1,34 @@
{
lib,
mkMesonLibrary,
nix-store-c,
nix-expr-c,
nix-util-c,
nix-fetchers,
# Configuration Options
version,
}:
mkMesonLibrary (finalAttrs: {
pname = "nix-fetchers-c";
inherit version;
workDir = ./.;
propagatedBuildInputs = [
nix-util-c
nix-expr-c
nix-store-c
nix-fetchers
];
mesonFlags = [ ];
meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
})
@@ -5,6 +5,7 @@
mkMesonExecutable,
nix-fetchers,
nix-fetchers-c,
nix-store-test-support,
libgit2,
@@ -31,6 +32,9 @@ mkMesonExecutable (finalAttrs: {
rapidcheck
gtest
]
++ lib.optionals (lib.versionAtLeast version "2.29pre") [
nix-fetchers-c
]
++ lib.optionals (lib.versionAtLeast version "2.27") [
libgit2
];
@@ -4,6 +4,7 @@
nix-store-c,
nix-expr-c,
nix-fetchers-c,
nix-flake,
# Configuration Options
@@ -17,11 +18,17 @@ mkMesonLibrary (finalAttrs: {
workDir = ./.;
propagatedBuildInputs = [
nix-expr-c
nix-store-c
nix-flake
];
propagatedBuildInputs =
[
nix-expr-c
nix-store-c
]
++ lib.optionals (lib.versionAtLeast version "2.29pre") [
nix-fetchers-c
]
++ [
nix-flake
];
mesonFlags = [
];