solc: add darwin binary for now

This commit is contained in:
happysalada 2022-05-02 22:24:02 -04:00 committed by Yt
parent 67f6146500
commit fb60c5e7b3

View file

@ -1,4 +1,5 @@
{ lib, gccStdenv, fetchzip
, pkgs
, boost
, cmake
, coreutils
@ -41,9 +42,17 @@ let
sha256 = "1mnvxqsan034d2jiqnw2yvkljl7lwvhakmj5bscwp1fpkn655bbw";
};
solc = gccStdenv.mkDerivation rec {
pname = "solc";
version = "0.8.13";
pname = "solc";
version = "0.8.13";
meta = with lib; {
description = "Compiler for Ethereum smart contract language Solidity";
homepage = "https://github.com/ethereum/solidity";
license = licenses.gpl3;
maintainers = with maintainers; [ dbrock akru lionello sifmelcara ];
};
solc = if gccStdenv.isLinux then gccStdenv.mkDerivation rec {
inherit pname version meta;
# upstream suggests avoid using archive generated by github
src = fetchzip {
@ -105,13 +114,24 @@ let
passthru.tests = {
solcWithTests = solc.overrideAttrs (attrs: { doCheck = true; });
};
} else gccStdenv.mkDerivation rec {
inherit pname version meta;
meta = with lib; {
description = "Compiler for Ethereum smart contract language Solidity";
homepage = "https://github.com/ethereum/solidity";
license = licenses.gpl3;
maintainers = with maintainers; [ dbrock akru lionello sifmelcara ];
src = pkgs.fetchurl {
url = "https://github.com/ethereum/solidity/releases/download/v${version}/solc-macos";
sha256 = "sha256-FNTvAT6oKtlekf2Um3+nt4JxpIP/GnnEPWzFi4JvW+o=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${src} $out/bin/solc
chmod +x $out/bin/solc
runHook postInstall
'';
};
in
solc