Commit cf5f2ec2 authored by Robert Hensing's avatar Robert Hensing
Browse files

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.
parent d1adddbb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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=";
        };
      };

+3 −0
Original line number Diff line number Diff line
@@ -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 { };
+37 −22
Original line number Diff line number Diff line
@@ -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,7 +66,13 @@ let
        nix-cmd
        ;
    }
    // lib.optionalAttrs
    // 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
@@ -225,11 +234,17 @@ stdenv.mkDerivation (finalAttrs: {
      "out"
      "man"
    ];
    pkgConfigModules = [
    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"
+34 −0
Original line number Diff line number Diff line
{
  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;
  };

})
+4 −0
Original line number Diff line number Diff line
@@ -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
    ];
Loading