Loading pkgs/os-specific/windows/msvcSdk/default.nix +19 −36 Original line number Diff line number Diff line { lib, config, stdenvNoCC, xwin, testers, llvmPackages, callPackage, }: let version = (builtins.fromJSON (builtins.readFile ./manifest.json)).info.buildVersion; hashes = (builtins.fromJSON (builtins.readFile ./hashes.json)); host = stdenvNoCC.hostPlatform; arch = if host.isx86_64 then "x86_64" else if host.isAarch64 then "aarch64" else if host.isx86_32 then "x86" else if host.isAarch32 then "aarch" else throw "Unsupported system"; fetchWinSdk = callPackage ./fetchWinSdk.nix { }; in stdenvNoCC.mkDerivation (finalAttrs: { inherit version; pname = "msvc-sdk"; dontUnpack = true; pname = "win-sdk"; src = fetchWinSdk { manifest = ./manifest.json; hash = hashes.${finalAttrs.src.arch}; }; strictDeps = true; nativeBuildInputs = [ xwin ]; outputHashAlgo = "sha256"; outputHashMode = "recursive"; 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}; nativeBuildInputs = [ xwin ]; __structuredAttrs = true; xwinArgs = [ "--accept-license" "--cache-dir=xwin-out" "--cache-dir=." "--manifest=${./manifest.json}" "--arch=${arch}" "--arch=${finalAttrs.src.arch}" "splat" "--preserve-ms-arch-notation" ]; buildPhase = '' runHook preBuild installPhase = '' runHook preInstall xwin "''${xwinArgs[@]}" mkdir "$out" mv xwin-out/splat/* "$out" runHook postBuild mkdir -p "$out" cp -r splat/* "$out" runHook postInstall ''; dontFixup = true; dontInstall = true; passthru = { updateScript = ./update.nu; Loading pkgs/os-specific/windows/msvcSdk/fetchWinSdk.nix 0 → 100644 +91 −0 Original line number Diff line number Diff line { lib, config, stdenvNoCC, xwin, }: let host = stdenvNoCC.hostPlatform; hostArch = if host.isx86_64 then "x86_64" else if host.isAarch64 then "aarch64" else if host.isx86_32 then "x86" else if host.isAarch32 then "aarch" else throw "Unsupported system"; in lib.extendMkDerivation { constructDrv = stdenvNoCC.mkDerivation; excludeDrvArgNames = [ "manifest" "arch" ]; extendDrvArgs = finalAttrs: { name ? "xwin-fetch-msvc", hash ? lib.fakeHash, manifest ? null, arch ? hostArch, ... }@args: { inherit name; __structuredAttrs = true; dontUnpack = true; dontFixup = true; dontInstall = true; strictDeps = true; nativeBuildInputs = [ xwin ]; outputHashAlgo = "sha256"; outputHashMode = "recursive"; 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 hash; xwinArgs = lib.optionals (manifest != null) [ "--manifest=${manifest}" ] ++ [ "--accept-license" "--cache-dir=${placeholder "out"}" "--arch=${arch}" "download" ]; buildPhase = args.buildPhase or '' runHook preBuild xwin "''${xwinArgs[@]}" runHook postBuild ''; passthru = { inherit arch; }; meta.license = { deprecated = false; fullName = "Microsoft Software License Terms"; shortName = "msvc"; spdxId = "unknown"; free = false; url = "https://www.visualstudio.com/license-terms/mt644918/"; }; }; } pkgs/os-specific/windows/msvcSdk/hashes.json +3 −3 Original line number Diff line number Diff line { "x86_64": "sha256-kp+xePTRZgqdAV3/BYhqKke3dXIkLWLM+IWFXtN2rHM=", "x86": "sha256-xEXV+XBNoXpAO8R/oDj8gfGb5tICr9ps4DN8Q4lqK2k=", "aarch64": "sha256-r0tTQUq3CePJ/7Vuzf4Zsy3Ebu0KiXNBwRHmrO3d15E=" "x86_64": "sha256-rEHwc09hLh3dKvA2TYHJKeFDycajPe8Ewfcdw85QY48=", "x86": "sha256-yibiyIwGe9kSJzTFpDc8ilF65aKQ9qMLrx2k14uM4Zk=", "aarch64": "sha256-RB/Hubhm+73kPUiKOKtm6vwf2ldm1raezNmmGEdQf9w=" } pkgs/os-specific/windows/msvcSdk/manifest.json +58 −59 File changed.Preview size limit exceeded, changes collapsed. Show changes pkgs/os-specific/windows/msvcSdk/update.nu +2 −2 Original line number Diff line number Diff line Loading @@ -36,9 +36,9 @@ def main [] { |arch| let dir = mktemp -d xwin --accept-license --cache-dir $dir --manifest $"($PATH | path join manifest.json)" --arch $arch splat --preserve-ms-arch-notation xwin --accept-license --cache-dir $dir --manifest $"($PATH | path join manifest.json)" --arch $arch download let hash = nix hash path ($dir | path join splat) let hash = nix hash path $dir {arch: $arch, hash: $hash} } | transpose -r -d Loading Loading
pkgs/os-specific/windows/msvcSdk/default.nix +19 −36 Original line number Diff line number Diff line { lib, config, stdenvNoCC, xwin, testers, llvmPackages, callPackage, }: let version = (builtins.fromJSON (builtins.readFile ./manifest.json)).info.buildVersion; hashes = (builtins.fromJSON (builtins.readFile ./hashes.json)); host = stdenvNoCC.hostPlatform; arch = if host.isx86_64 then "x86_64" else if host.isAarch64 then "aarch64" else if host.isx86_32 then "x86" else if host.isAarch32 then "aarch" else throw "Unsupported system"; fetchWinSdk = callPackage ./fetchWinSdk.nix { }; in stdenvNoCC.mkDerivation (finalAttrs: { inherit version; pname = "msvc-sdk"; dontUnpack = true; pname = "win-sdk"; src = fetchWinSdk { manifest = ./manifest.json; hash = hashes.${finalAttrs.src.arch}; }; strictDeps = true; nativeBuildInputs = [ xwin ]; outputHashAlgo = "sha256"; outputHashMode = "recursive"; 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}; nativeBuildInputs = [ xwin ]; __structuredAttrs = true; xwinArgs = [ "--accept-license" "--cache-dir=xwin-out" "--cache-dir=." "--manifest=${./manifest.json}" "--arch=${arch}" "--arch=${finalAttrs.src.arch}" "splat" "--preserve-ms-arch-notation" ]; buildPhase = '' runHook preBuild installPhase = '' runHook preInstall xwin "''${xwinArgs[@]}" mkdir "$out" mv xwin-out/splat/* "$out" runHook postBuild mkdir -p "$out" cp -r splat/* "$out" runHook postInstall ''; dontFixup = true; dontInstall = true; passthru = { updateScript = ./update.nu; Loading
pkgs/os-specific/windows/msvcSdk/fetchWinSdk.nix 0 → 100644 +91 −0 Original line number Diff line number Diff line { lib, config, stdenvNoCC, xwin, }: let host = stdenvNoCC.hostPlatform; hostArch = if host.isx86_64 then "x86_64" else if host.isAarch64 then "aarch64" else if host.isx86_32 then "x86" else if host.isAarch32 then "aarch" else throw "Unsupported system"; in lib.extendMkDerivation { constructDrv = stdenvNoCC.mkDerivation; excludeDrvArgNames = [ "manifest" "arch" ]; extendDrvArgs = finalAttrs: { name ? "xwin-fetch-msvc", hash ? lib.fakeHash, manifest ? null, arch ? hostArch, ... }@args: { inherit name; __structuredAttrs = true; dontUnpack = true; dontFixup = true; dontInstall = true; strictDeps = true; nativeBuildInputs = [ xwin ]; outputHashAlgo = "sha256"; outputHashMode = "recursive"; 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 hash; xwinArgs = lib.optionals (manifest != null) [ "--manifest=${manifest}" ] ++ [ "--accept-license" "--cache-dir=${placeholder "out"}" "--arch=${arch}" "download" ]; buildPhase = args.buildPhase or '' runHook preBuild xwin "''${xwinArgs[@]}" runHook postBuild ''; passthru = { inherit arch; }; meta.license = { deprecated = false; fullName = "Microsoft Software License Terms"; shortName = "msvc"; spdxId = "unknown"; free = false; url = "https://www.visualstudio.com/license-terms/mt644918/"; }; }; }
pkgs/os-specific/windows/msvcSdk/hashes.json +3 −3 Original line number Diff line number Diff line { "x86_64": "sha256-kp+xePTRZgqdAV3/BYhqKke3dXIkLWLM+IWFXtN2rHM=", "x86": "sha256-xEXV+XBNoXpAO8R/oDj8gfGb5tICr9ps4DN8Q4lqK2k=", "aarch64": "sha256-r0tTQUq3CePJ/7Vuzf4Zsy3Ebu0KiXNBwRHmrO3d15E=" "x86_64": "sha256-rEHwc09hLh3dKvA2TYHJKeFDycajPe8Ewfcdw85QY48=", "x86": "sha256-yibiyIwGe9kSJzTFpDc8ilF65aKQ9qMLrx2k14uM4Zk=", "aarch64": "sha256-RB/Hubhm+73kPUiKOKtm6vwf2ldm1raezNmmGEdQf9w=" }
pkgs/os-specific/windows/msvcSdk/manifest.json +58 −59 File changed.Preview size limit exceeded, changes collapsed. Show changes
pkgs/os-specific/windows/msvcSdk/update.nu +2 −2 Original line number Diff line number Diff line Loading @@ -36,9 +36,9 @@ def main [] { |arch| let dir = mktemp -d xwin --accept-license --cache-dir $dir --manifest $"($PATH | path join manifest.json)" --arch $arch splat --preserve-ms-arch-notation xwin --accept-license --cache-dir $dir --manifest $"($PATH | path join manifest.json)" --arch $arch download let hash = nix hash path ($dir | path join splat) let hash = nix hash path $dir {arch: $arch, hash: $hash} } | transpose -r -d Loading