Loading pkgs/development/compilers/dart/sources.nix +0 −3 Original line number Diff line number Diff line # This file was generated by ./update.sh. # If you do not find a line of three #-s at the end, it is broken and should not be used. let version = "2.19.3"; in { fetchurl }: { versionUsed = version; Loading @@ -24,4 +22,3 @@ let version = "2.19.3"; in sha256 = "0xksis14ff6bzjvycgxgldg96n88rh42adjyrrhcay2s183vh480"; }; } ### pkgs/development/compilers/dart/update.sh +8 −11 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ set -euo pipefail # so if the script fails, debug logs are on stdenv # so if the script fails, debug logs are on stderr log() { >&2 echo "DART_UPDATER: $@" } Loading @@ -13,12 +13,11 @@ NEW_VER_DETAILS=$(curl -sL https://storage.googleapis.com/dart-archive/channels/ NEW_VER=$(jq -r '.version' <<< "$NEW_VER_DETAILS") MY_PATH=$(dirname $(realpath "$0")) SRC_FILE="$MY_PATH/sources.nix" SRC_FILE=$(mktemp) log "file to write is $SRC_FILE" PRELUDE="# This file was generated by ./update.sh. # If you do not find a line of three #-s at the end, it is broken and should not be used. let version = \"$NEW_VER\"; in PRELUDE="let version = \"$NEW_VER\"; in { fetchurl }: { versionUsed = version;" echo "$PRELUDE" > "$SRC_FILE" Loading Loading @@ -54,8 +53,7 @@ write_for_platform() { echo "$FETCHER" >> $SRC_FILE done log "finished for $1 ---" log "finished for $1" } Loading @@ -73,8 +71,7 @@ declare -A LIN_PLATFORMS=( ["x86_64-linux"]="$X8664" write_for_platform "DARWIN_PLATFORMS" "macos" write_for_platform "LIN_PLATFORMS" "linux" echo '} ###' >> $SRC_FILE echo '}' >> $SRC_FILE log "Replacing version in dart/default.nix" sed -i "s/$UPDATE_NIX_OLD_VERSION/$NEW_VER/g" "$MY_PATH/default.nix" log "moving tempfile to target directory" mv "$SRC_FILE" "$MY_PATH/sources.nix" Loading
pkgs/development/compilers/dart/sources.nix +0 −3 Original line number Diff line number Diff line # This file was generated by ./update.sh. # If you do not find a line of three #-s at the end, it is broken and should not be used. let version = "2.19.3"; in { fetchurl }: { versionUsed = version; Loading @@ -24,4 +22,3 @@ let version = "2.19.3"; in sha256 = "0xksis14ff6bzjvycgxgldg96n88rh42adjyrrhcay2s183vh480"; }; } ###
pkgs/development/compilers/dart/update.sh +8 −11 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ set -euo pipefail # so if the script fails, debug logs are on stdenv # so if the script fails, debug logs are on stderr log() { >&2 echo "DART_UPDATER: $@" } Loading @@ -13,12 +13,11 @@ NEW_VER_DETAILS=$(curl -sL https://storage.googleapis.com/dart-archive/channels/ NEW_VER=$(jq -r '.version' <<< "$NEW_VER_DETAILS") MY_PATH=$(dirname $(realpath "$0")) SRC_FILE="$MY_PATH/sources.nix" SRC_FILE=$(mktemp) log "file to write is $SRC_FILE" PRELUDE="# This file was generated by ./update.sh. # If you do not find a line of three #-s at the end, it is broken and should not be used. let version = \"$NEW_VER\"; in PRELUDE="let version = \"$NEW_VER\"; in { fetchurl }: { versionUsed = version;" echo "$PRELUDE" > "$SRC_FILE" Loading Loading @@ -54,8 +53,7 @@ write_for_platform() { echo "$FETCHER" >> $SRC_FILE done log "finished for $1 ---" log "finished for $1" } Loading @@ -73,8 +71,7 @@ declare -A LIN_PLATFORMS=( ["x86_64-linux"]="$X8664" write_for_platform "DARWIN_PLATFORMS" "macos" write_for_platform "LIN_PLATFORMS" "linux" echo '} ###' >> $SRC_FILE echo '}' >> $SRC_FILE log "Replacing version in dart/default.nix" sed -i "s/$UPDATE_NIX_OLD_VERSION/$NEW_VER/g" "$MY_PATH/default.nix" log "moving tempfile to target directory" mv "$SRC_FILE" "$MY_PATH/sources.nix"