go-ethereum.nix 1.2 KB

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