go-ethereum.nix 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ## adapted from go-ethereum.nix in nixpkgs repository
  2. {
  3. pkgs,
  4. lib,
  5. stdenv,
  6. buildGoModule,
  7. # nixosTests,
  8. tag_version,
  9. vendor_hash,
  10. }:
  11. buildGoModule {
  12. pname = "go-ethereum";
  13. version = tag_version;
  14. src = fetchGit {
  15. url = "https://github.com/ethereum/go-ethereum.git";
  16. ref = "refs/tags/${tag_version}";
  17. };
  18. proxyVendor = false;
  19. vendorHash = vendor_hash;
  20. doCheck = false;
  21. subPackages = [ "cmd/geth" ];
  22. ## Following upstream: https://github.com/ethereum/go-ethereum/blob/v1.11.6/build/ci.go#L218
  23. tags = [ "urfave_cli_no_docs" ];
  24. ## Fix for usb-related segmentation faults on darwin
  25. propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
  26. pkgs.libobjc
  27. pkgs.IOKit
  28. ];
  29. # passthru.tests = { inherit (nixosTests) geth; };
  30. meta = with lib; {
  31. homepage = "https://geth.ethereum.org/";
  32. description = "Official golang implementation of the Ethereum protocol";
  33. license = with licenses; [
  34. lgpl3Plus
  35. gpl3Plus
  36. ];
  37. maintainers = with maintainers; [ RaghavSood ];
  38. mainProgram = "geth";
  39. };
  40. }