Unverified Commit 2a7d3d04 authored by David McFarland's avatar David McFarland Committed by GitHub
Browse files

dotnetCorePackages: fix evaluation in cross (#511302)

parents 8aa3bfe4 016041b0
Loading
Loading
Loading
Loading
+47 −48
Original line number Diff line number Diff line
@@ -11,10 +11,11 @@
  generateSplicesForMkScope,
  makeScopeWithSplicing',
  writeScriptBin,
  buildPackages,
  newScope,
}:

let
  scope = makeScopeWithSplicing' {
makeScopeWithSplicing' {
  otherSplices = generateSplicesForMkScope "dotnetCorePackages";
  f = (
    self:
@@ -25,7 +26,7 @@ let

      buildDotnetSdk =
        let
            buildDotnet = attrs: callPackage (import ./binary/build-dotnet.nix attrs) { };
          buildDotnet = attrs: callWithUtils (import ./binary/build-dotnet.nix attrs) { };
        in
        version:
        import version {
@@ -44,8 +45,10 @@ let
        "i686-windows" = "win-x86";
      };

      in
      {
      # used to break cycle in attribute names
      callWithUtils = newScope (utils // { callPackage = callWithUtils; });

      utils = {
        inherit
          callPackage
          fetchNupkg
@@ -63,7 +66,7 @@ let

        combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };

        patchNupkgs = callPackage ./patch-nupkgs.nix { };
        patchNupkgs = buildPackages.callPackage ./patch-nupkgs.nix { };
        nugetPackageHook = callPackage ./nuget-package-hook.nix { };
        autoPatchcilHook = callPackage ../../../build-support/dotnet/auto-patchcil-hook { };

@@ -73,39 +76,35 @@ let
        mkNugetSource = callPackage ../../../build-support/dotnet/make-nuget-source { };
        mkNugetDeps = callPackage ../../../build-support/dotnet/make-nuget-deps { };
        addNuGetDeps = callPackage ../../../build-support/dotnet/add-nuget-deps { };
      }
    );
      };

  callPackage = scope.callPackage;

  pkgs =
    scope
    in
    utils
    // (
      let
        dotnet_6 = callPackage ./dotnet.nix {
        dotnet_6 = callWithUtils ./dotnet.nix {
          channel = "6.0";
          withVMR = false;
        };

        dotnet_7 = callPackage ./dotnet.nix {
        dotnet_7 = callWithUtils ./dotnet.nix {
          channel = "7.0";
          withVMR = false;
        };

        dotnet_8 = callPackage ./dotnet.nix {
        dotnet_8 = callWithUtils ./dotnet.nix {
          channel = "8.0";
        };

        dotnet_9 = callPackage ./dotnet.nix {
        dotnet_9 = callWithUtils ./dotnet.nix {
          channel = "9.0";
        };

        dotnet_10 = callPackage ./dotnet.nix {
        dotnet_10 = callWithUtils ./dotnet.nix {
          channel = "10.0";
        };

        dotnet_11 = callPackage ./dotnet.nix {
        dotnet_11 = callWithUtils ./dotnet.nix {
          channel = "11.0";
        };
      in
@@ -125,6 +124,6 @@ let
        dotnet_10
        dotnet_11
      ]
    )
  );
in
pkgs
}