Skip to content

Commit

Permalink
Fixes and updates, version 0.8.28 (#18)
Browse files Browse the repository at this point in the history
* Add 0.6.10 through 0.6.12 to download.sh
* Update 0.8.24 hash to match universal binary
I'm not 100% sure if this is what's desired, but I noticed that the cached version must be the old non-universal binary for 0.8.24 instead of the universal binary. When running a full rebuild, this is the hash I get.
* Add wget and jq to download.sh shell
I'm adding these because they're not part of POSIX and might not be installed in every environment.
* Use realpath before running nix hash file
This seems to be necessary for my system. nix hash file gives an error: path '.../bin/macos-aarch64/solc-0.8.x' is a symlink, which this change fixes.
* Add 0.8.28

---------

Co-authored-by: Miao, ZhiCheng <[email protected]>
  • Loading branch information
benmanns and hellwolf authored Nov 16, 2024
1 parent e035e0c commit 0714c24
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
set -x
# test `nix develop`
nix develop .# --command -- bash -c "solc-0.8.27 --version"
nix develop .# --command -- bash -c "solc-0.8.28 --version"
# test `nix shell`
nix shell .#solc_0_8_19
# test solc.nix as input to other flakes
# Note: overriding flake input is needed as a workaround to local sub flake with overlapping paths.
nix develop ./test/.# --override-input solc $PWD --command -- bash -c "solc --version"
nix develop ./test/.# --override-input solc $PWD --command -- bash -c "solc-0.8.27 --version"
nix develop ./test/.# --override-input solc $PWD --command -- bash -c "solc-0.8.28 --version"
ci-check-success:
needs: [ci]
runs-on: ubuntu-latest
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flake-utils.url = "github:numtide/flake-utils";
solc-macos-amd64-list-json = {
# Go to https://github.com/ethereum/solc-bin/blob/gh-pages/macosx-amd64/list.json to obtain a revision
url = "file+https://github.com/ethereum/solc-bin/raw/a2346e2/macosx-amd64/list.json";
url = "file+https://github.com/ethereum/solc-bin/raw/67f45d8/macosx-amd64/list.json";
flake = false;
};
};
Expand Down Expand Up @@ -38,7 +38,7 @@
in
{
# default shell with the latest solc compiler
devShells.default = pkgs.mkShell { buildInputs = [ pkgs.solc_0_8_27 ]; };
devShells.default = pkgs.mkShell { buildInputs = [ pkgs.solc_0_8_28 ]; };

# export all solc packages
packages = pkgs.solcPackages;
Expand Down
10 changes: 9 additions & 1 deletion solc-listing.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[ # DO NOT MODIFY! AUTO GENERATED BY ./utils/create-listing.sh
{
version = "0.8.28";
sha256 = {
solc-static-linux = "sha256-mg+34NssBkHbrhxcxkXcaGggyDr1FiJquxwKL3ZjbyU=";
solc-macos-amd64 = "sha256-gVFbDlPeqiZtVJVFzKrApalubU6CAcd/ZzsscQl22eo=";
solc-macos-aarch64 = "sha256-gVFbDlPeqiZtVJVFzKrApalubU6CAcd/ZzsscQl22eo=";
};
}
{
version = "0.8.27";
sha256 = {
Expand Down Expand Up @@ -28,7 +36,7 @@
sha256 = {
solc-static-linux = "sha256-+wOimlF0UrnxK89FnvN9ClQ3Zbs7vJEecKh9ajfDDV8=";
solc-macos-amd64 = "sha256-zC1ExwaQXMw4L0hGJd/2HXQeDCQjLSJvE5poNfxkTz8=";
solc-macos-aarch64 = "sha256-HLG/xM32hz6/NtxlMXqKBhQJa5wrzKW7H3DVfTGcUKY=";
solc-macos-aarch64 = "sha256-zC1ExwaQXMw4L0hGJd/2HXQeDCQjLSJvE5poNfxkTz8=";
};
}
{
Expand Down
4 changes: 2 additions & 2 deletions test/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
mkShell {
buildInputs =
[
solc_0_8_27
(solc.mkDefault pkgs solc_0_8_27)
solc_0_8_28
(solc.mkDefault pkgs solc_0_8_28)
]
++ (
if system == "x86_64-linux" then
Expand Down
3 changes: 2 additions & 1 deletion utils/create-listing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ print_hash() {
t="$1"
f="$2"
if [[ -f "$f" ]]; then
echo "$t = \"$(nix hash file "$f")\";"
rp=$(realpath "$f")
echo "$t = \"$(nix hash file "$rp")\";"
else
echo "# $t not available for this version";
fi
Expand Down
6 changes: 3 additions & 3 deletions utils/download.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p semver-tool
#! nix-shell -i bash -p semver-tool wget jq

macos_versions=$(mktemp)
curl https://binaries.soliditylang.org/macosx-amd64/list.json >"$macos_versions"
Expand All @@ -10,9 +10,9 @@ T=$(dirname "$0")/..
list_all_versions() {
for i in $(seq 11 26); do echo 0.4."$i"; done
for i in $(seq 0 17); do echo 0.5."$i"; done
for i in $(seq 0 9); do echo 0.6."$i"; done
for i in $(seq 0 12); do echo 0.6."$i"; done
for i in $(seq 0 6); do echo 0.7."$i"; done
for i in $(seq 0 27); do echo 0.8."$i"; done
for i in $(seq 0 28); do echo 0.8."$i"; done
}

run_wget() {
Expand Down

0 comments on commit 0714c24

Please sign in to comment.