Unverified Commit 464767ca authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

windows: fix eval if ci enabled (#436840)

parents efd138d0 b9509c28
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
{
  lib,
  config,
  stdenv,
  buildPackages,
  pkgs,
@@ -9,7 +10,9 @@
}:

lib.makeScope newScope (
  self: with self; {
  self:
  with self;
  {
    dlfcn = callPackage ./dlfcn { };

    mingw_w64 = callPackage ./mingw-w64 {
@@ -31,8 +34,6 @@ lib.makeScope newScope (

    mingw_w64_headers = callPackage ./mingw-w64/headers.nix { };

    mingw_w64_pthreads = lib.warn "windows.mingw_w64_pthreads is deprecated, windows.pthreads should be preferred" self.pthreads;

    mcfgthreads = callPackage ./mcfgthreads { stdenv = crossThreadsStdenv; };

    npiperelay = callPackage ./npiperelay { };
@@ -43,4 +44,7 @@ lib.makeScope newScope (

    sdk = callPackage ./msvcSdk { };
  }
  // lib.optionalAttrs config.allowAliases {
    mingw_w64_pthreads = lib.warn "windows.mingw_w64_pthreads is deprecated, windows.pthreads should be preferred" self.pthreads;
  }
)
+98 −96
Original line number Diff line number Diff line
@@ -24,13 +24,6 @@ let
    else
      throw "Unsupported system";
in
if !config.microsoftVisualStudioLicenseAccepted then
  throw ''
    Microsoft Software License Terms are not accepted with config.microsoftVisualStudioLicenseAccepted.
    Please read https://visualstudio.microsoft.com/license-terms/mt644918/ and if you agree, change your
    config to indicate so.
  ''
else
stdenvNoCC.mkDerivation (finalAttrs: {
  inherit version;
  pname = "msvc-sdk";
@@ -41,7 +34,15 @@ else

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
    outputHash = hashes.${arch};
  outputHash =
    if !config.microsoftVisualStudioLicenseAccepted then
      throw ''
        Microsoft Software License Terms are not accepted with config.microsoftVisualStudioLicenseAccepted.
        Please read https://visualstudio.microsoft.com/license-terms/mt644918/ and if you agree, change your
        config to indicate so.
      ''
    else
      hashes.${arch};

  __structuredAttrs = true;
  xwinArgs = [
@@ -114,6 +115,7 @@ else
      fullName = "Microsoft Software License Terms";
      shortName = "msvc";
      spdxId = "unknown";
      free = false;
      url = "https://www.visualstudio.com/license-terms/mt644918/";
    };
    platforms = lib.platforms.all;