go-ethereum.nix 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. # url = /path/to/repo/go-ethereum.git;
  18. ref = "refs/tags/${tag_version}";
  19. shallow = true;
  20. };
  21. proxyVendor = false;
  22. vendorHash = vendor_hash;
  23. doCheck = false;
  24. subPackages = [ "cmd/geth" ];
  25. ## Following upstream: https://github.com/ethereum/go-ethereum/blob/v1.11.6/build/ci.go#L218
  26. tags = [ "urfave_cli_no_docs" ];
  27. ## Fix for usb-related segmentation faults on darwin
  28. propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
  29. pkgs.libobjc
  30. pkgs.IOKit
  31. ];
  32. # passthru.tests = { inherit (nixosTests) geth; };
  33. meta = with lib; {
  34. homepage = "https://geth.ethereum.org/";
  35. description = "Official golang implementation of the Ethereum protocol";
  36. license = with licenses; [
  37. lgpl3Plus
  38. gpl3Plus
  39. ];
  40. maintainers = with maintainers; [ RaghavSood ];
  41. mainProgram = "geth";
  42. };
  43. }