-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: don't support solc 0.8 (#1160)
* Problem: don't support solc 0.8 Solution: - support multiple solc in the nix shell * avoid fork the repo
- Loading branch information
Showing
6 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ dapptools-release, dapptools-master }: | ||
self: super: | ||
let | ||
dapptools = { | ||
x86_64-linux = | ||
(import (dapptools-release + "/release.nix") { }).dapphub.linux.stable; | ||
x86_64-darwin = | ||
(import (dapptools-release + "/release.nix") { }).dapphub.darwin.stable; | ||
}.${self.system} or (throw | ||
"Unsupported system: ${self.system}"); | ||
dapptools-patched = self.srcOnly { | ||
name = "dapptools-patched"; | ||
src = dapptools-master; | ||
patches = [ | ||
./dapptools.patch | ||
]; | ||
}; | ||
in | ||
{ | ||
# use released version to hit the binary cache | ||
inherit (dapptools) dapp solc-versions; | ||
# use the patched version to access solc-static-versions | ||
inherit (import (dapptools-patched + "/overlay.nix") self super) solc-static-versions; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 455cfd7356c0a10d276e614304ed2b93b880257d Mon Sep 17 00:00:00 2001 | ||
From: HuangYi <[email protected]> | ||
Date: Mon, 11 Sep 2023 14:50:08 +0800 | ||
Subject: [PATCH] fix solc-static on macos | ||
|
||
--- | ||
nix/solc-static.nix | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/nix/solc-static.nix b/nix/solc-static.nix | ||
index 8ea194ea..e6945828 100644 | ||
--- a/nix/solc-static.nix | ||
+++ b/nix/solc-static.nix | ||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec { | ||
sha256 = "${sha256}"; | ||
}; | ||
|
||
- nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; | ||
+ nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isLinux autoPatchelfHook; | ||
|
||
postFixup = if (platform == "linux-amd64") then '' | ||
wrapProgram $out/bin/solc-${version} \ | ||
-- | ||
2.39.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ runCommandLocal }: | ||
drv: oldName: newName: | ||
runCommandLocal drv.name { } '' | ||
mkdir -p $out/bin | ||
ln -s ${drv}/bin/${oldName} $out/bin/${newName} | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters