Loading pkgs/development/compilers/dart/default.nix +27 −9 Original line number Diff line number Diff line Loading @@ -8,25 +8,43 @@ runCommand, cctools, darwin, sources ? import ./sources.nix { inherit fetchurl; }, version ? sources.versionUsed, }: assert sources != null && (builtins.isAttrs sources); stdenv.mkDerivation (finalAttrs: { pname = "dart"; inherit version; nativeBuildInputs = [ unzip ]; version = "3.10.9"; src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}"); let selectSystem = attrs: attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); system = selectSystem { x86_64-linux = "linux-x64"; aarch64-linux = "linux-arm64"; x86_64-darwin = "macos-x64"; aarch64-darwin = "macos-arm64"; }; hash = selectSystem { x86_64-linux = "sha256-1DudOiG4LvKjfTGUW5nmuI9fjcROwZG0c/1inXjQuZQ="; aarch64-linux = "sha256-Z8mPnmppTtPLNiY0Ny1pRzBAs3EoNtQsr82zxWwKBOs="; x86_64-darwin = "sha256-pd37vWDOIKGdek/CuUSH7sVyiKqlLOW6GLT4IkzkwYA="; aarch64-darwin = "sha256-99gMhvkzSJmYEsGuD3kBN1e3l685Xyy6cNICegC+Vk4="; }; in fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/${ if lib.strings.hasSuffix ".beta" finalAttrs.version then "beta" else "stable" }/release/${finalAttrs.version}/sdk/dartsdk-${system}-release.zip"; inherit hash; }; nativeBuildInputs = [ unzip ]; installPhase = '' runHook preInstall rm LICENSE rm LICENSE README revision cp -R . $out '' + lib.optionalString (stdenv.hostPlatform.isLinux) '' Loading pkgs/development/compilers/dart/sources.nixdeleted 100644 → 0 +0 −23 Original line number Diff line number Diff line let version = "3.10.7"; in { fetchurl }: { versionUsed = version; "${version}-x86_64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip"; hash = "sha256-EES4leNoHZWFs/nQUJTzN+cCKGzxiANpLJrkXb1UKdA="; }; "${version}-aarch64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip"; hash = "sha256-ovQkvU5BpqXHUlUebUKKranJUERhZPsAsfO3N+4jzKs="; }; "${version}-aarch64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip"; hash = "sha256-gb3NiChgaYFxPFE+PUN37u3sQxxGvzXzJ3xquvLXvVE="; }; "${version}-x86_64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip"; hash = "sha256-ik7qz012kOAzidYygkG8aaG2HLmA8j1Q9i66y1kg7HQ="; }; } pkgs/development/compilers/dart/update.sh +2 −2 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ fi MY_PATH=$(dirname $(realpath "$0")) update-source-version dart $latestVersion --file=$MY_PATH/sources.nix update-source-version dart $latestVersion --file=$MY_PATH/default.nix systems=$(nix eval --json -f . dart.meta.platforms | jq --raw-output '.[]') for system in $systems; do hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . dart.src.url --system "$system"))) update-source-version dart $latestVersion $hash --file=$MY_PATH/sources.nix --system=$system --ignore-same-version --ignore-same-hash update-source-version dart $latestVersion $hash --file=$MY_PATH/default.nix --system=$system --ignore-same-version --ignore-same-hash done pkgs/development/compilers/flutter/default.nix +11 −22 Original line number Diff line number Diff line Loading @@ -50,30 +50,19 @@ let ; dart = let dartChannel = if lib.strings.hasSuffix ".beta" dartVersion then "beta" else "stable"; in dart.override { (dart.overrideAttrs (_: { # This overrideAttrs is used to replace the version in src.url version = dartVersion; sources = { "${dartVersion}-x86_64-linux" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip"; hash = dartHash.x86_64-linux; }; "${dartVersion}-aarch64-linux" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip"; hash = dartHash.aarch64-linux; }; "${dartVersion}-x86_64-darwin" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip"; hash = dartHash.x86_64-darwin; }; "${dartVersion}-aarch64-darwin" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-macos-arm64-release.zip"; hash = dartHash.aarch64-darwin; }; }; __intentionallyOverridingVersion = true; })).overrideAttrs (oldAttrs: { src = fetchzip { inherit (oldAttrs.src) url; hash = dartHash.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); }; }); src = let source = fetchFromGitHub { Loading Loading
pkgs/development/compilers/dart/default.nix +27 −9 Original line number Diff line number Diff line Loading @@ -8,25 +8,43 @@ runCommand, cctools, darwin, sources ? import ./sources.nix { inherit fetchurl; }, version ? sources.versionUsed, }: assert sources != null && (builtins.isAttrs sources); stdenv.mkDerivation (finalAttrs: { pname = "dart"; inherit version; nativeBuildInputs = [ unzip ]; version = "3.10.9"; src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}"); let selectSystem = attrs: attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); system = selectSystem { x86_64-linux = "linux-x64"; aarch64-linux = "linux-arm64"; x86_64-darwin = "macos-x64"; aarch64-darwin = "macos-arm64"; }; hash = selectSystem { x86_64-linux = "sha256-1DudOiG4LvKjfTGUW5nmuI9fjcROwZG0c/1inXjQuZQ="; aarch64-linux = "sha256-Z8mPnmppTtPLNiY0Ny1pRzBAs3EoNtQsr82zxWwKBOs="; x86_64-darwin = "sha256-pd37vWDOIKGdek/CuUSH7sVyiKqlLOW6GLT4IkzkwYA="; aarch64-darwin = "sha256-99gMhvkzSJmYEsGuD3kBN1e3l685Xyy6cNICegC+Vk4="; }; in fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/${ if lib.strings.hasSuffix ".beta" finalAttrs.version then "beta" else "stable" }/release/${finalAttrs.version}/sdk/dartsdk-${system}-release.zip"; inherit hash; }; nativeBuildInputs = [ unzip ]; installPhase = '' runHook preInstall rm LICENSE rm LICENSE README revision cp -R . $out '' + lib.optionalString (stdenv.hostPlatform.isLinux) '' Loading
pkgs/development/compilers/dart/sources.nixdeleted 100644 → 0 +0 −23 Original line number Diff line number Diff line let version = "3.10.7"; in { fetchurl }: { versionUsed = version; "${version}-x86_64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip"; hash = "sha256-EES4leNoHZWFs/nQUJTzN+cCKGzxiANpLJrkXb1UKdA="; }; "${version}-aarch64-darwin" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip"; hash = "sha256-ovQkvU5BpqXHUlUebUKKranJUERhZPsAsfO3N+4jzKs="; }; "${version}-aarch64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip"; hash = "sha256-gb3NiChgaYFxPFE+PUN37u3sQxxGvzXzJ3xquvLXvVE="; }; "${version}-x86_64-linux" = fetchurl { url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip"; hash = "sha256-ik7qz012kOAzidYygkG8aaG2HLmA8j1Q9i66y1kg7HQ="; }; }
pkgs/development/compilers/dart/update.sh +2 −2 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ fi MY_PATH=$(dirname $(realpath "$0")) update-source-version dart $latestVersion --file=$MY_PATH/sources.nix update-source-version dart $latestVersion --file=$MY_PATH/default.nix systems=$(nix eval --json -f . dart.meta.platforms | jq --raw-output '.[]') for system in $systems; do hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . dart.src.url --system "$system"))) update-source-version dart $latestVersion $hash --file=$MY_PATH/sources.nix --system=$system --ignore-same-version --ignore-same-hash update-source-version dart $latestVersion $hash --file=$MY_PATH/default.nix --system=$system --ignore-same-version --ignore-same-hash done
pkgs/development/compilers/flutter/default.nix +11 −22 Original line number Diff line number Diff line Loading @@ -50,30 +50,19 @@ let ; dart = let dartChannel = if lib.strings.hasSuffix ".beta" dartVersion then "beta" else "stable"; in dart.override { (dart.overrideAttrs (_: { # This overrideAttrs is used to replace the version in src.url version = dartVersion; sources = { "${dartVersion}-x86_64-linux" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip"; hash = dartHash.x86_64-linux; }; "${dartVersion}-aarch64-linux" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip"; hash = dartHash.aarch64-linux; }; "${dartVersion}-x86_64-darwin" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip"; hash = dartHash.x86_64-darwin; }; "${dartVersion}-aarch64-darwin" = fetchzip { url = "https://storage.googleapis.com/dart-archive/channels/${dartChannel}/release/${dartVersion}/sdk/dartsdk-macos-arm64-release.zip"; hash = dartHash.aarch64-darwin; }; }; __intentionallyOverridingVersion = true; })).overrideAttrs (oldAttrs: { src = fetchzip { inherit (oldAttrs.src) url; hash = dartHash.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); }; }); src = let source = fetchFromGitHub { Loading