go-ethereum: Fix libusb segmentation faults on Darwin

This commit is contained in:
adisbladis 2017-10-03 10:13:30 +08:00
parent cb3d443787
commit ec331755d3
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ callPackage, boost155, boost162, boost163, openssl_1_1_0, haskellPackages }:
{ callPackage, boost155, boost162, boost163, openssl_1_1_0, haskellPackages, darwin }:
rec {
@ -26,7 +26,10 @@ rec {
dogecoind = callPackage ./dogecoin.nix { withGui = false; };
freicoin = callPackage ./freicoin.nix { boost = boost155; };
go-ethereum = callPackage ./go-ethereum.nix { };
go-ethereum = callPackage ./go-ethereum.nix {
inherit (darwin) libobjc;
inherit (darwin.apple_sdk.frameworks) IOKit;
};
go-ethereum-classic = callPackage ./go-ethereum-classic { };
hivemind = callPackage ./hivemind.nix { withGui = true; };

View File

@ -1,10 +1,14 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
{ stdenv, lib, buildGoPackage, fetchFromGitHub, libobjc, IOKit }:
buildGoPackage rec {
name = "go-ethereum-${version}";
version = "1.7.0";
goPackagePath = "github.com/ethereum/go-ethereum";
# Fix for usb-related segmentation faults on darwin
propagatedBuildInputs =
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
hardeningDisable = [ "fortify" ];