diff options
Diffstat (limited to 'pkgs/applications/networking/bee/bee.nix')
-rw-r--r-- | pkgs/applications/networking/bee/bee.nix | 69 |
1 files changed, 25 insertions, 44 deletions
diff --git a/pkgs/applications/networking/bee/bee.nix b/pkgs/applications/networking/bee/bee.nix index f2fe81e8379f8..cca2e549c8b1c 100644 --- a/pkgs/applications/networking/bee/bee.nix +++ b/pkgs/applications/networking/bee/bee.nix @@ -1,55 +1,34 @@ -{ version ? "release", lib, fetchFromGitHub, buildGoModule }: +{ lib +, fetchFromGitHub +, buildGoModule +}: -let - - versionSpec = rec { - unstable = rec { - pname = "bee-unstable"; - version = "2021-01-30"; - rev = "824636a2c2629c329ab10275cef6a0b7395343ad"; - goVersionString = "g" + builtins.substring 0 7 rev; # this seems to be some kind of standard of git describe... - sha256 = "0ly1yqjq29arbak8lchdradf39l5bmxpbfir6ljjc7nyqdxz0sxg"; - vendorHash = "sha256-w5ZijaK8Adt1ZHPMmXqRWq0v0jdprRKRu03rePtZLXA="; - }; - release = rec { - pname = "bee"; - version = "0.5.0"; - rev = "refs/tags/v${version}"; - sha256 = "sha256-3Oy9RhgMPRFjUs3Dj8XUhAqoxx5BTi32OiK4Y8YEG2Q="; - vendorHash = "sha256-w5ZijaK8Adt1ZHPMmXqRWq0v0jdprRKRu03rePtZLXA="; - }; - "0.5.0" = release; - "0.4.1" = rec { - pname = "bee"; - version = "0.4.1"; - rev = "refs/tags/v${version}"; - sha256 = "1bmgbav52pcb5p7cgq9756512fzfqhjybyr0dv538plkqx47mpv7"; - vendorHash = "sha256-UGxiCXWlIfnhRZZBMYcWXFj77pqvJkb5wOllSdQeaUg="; - }; - }.${version}; - -in - -buildGoModule { - inherit (versionSpec) pname version vendorHash; +buildGoModule rec { + pname = "bee"; + version = "1.18.2"; src = fetchFromGitHub { owner = "ethersphere"; repo = "bee"; - inherit (versionSpec) rev sha256; + rev = "v${version}"; + sha256 = "sha256-LUOKF1073GmQWG2q4w0cTErSHw7ok5N6PQZ45xpjYx4="; }; + vendorHash = "sha256-UdsF/otjXqS1NY3PkCimRiD93hGntHG3Xhw6avFtHog="; + subPackages = [ "cmd/bee" ]; - # no symbol table, no debug info, and pass the commit for the version string - ldflags = lib.optionals ( lib.hasAttr "goVersionString" versionSpec) - [ "-s" "-w" "-X=github.com/ethersphere/bee.commit=${versionSpec.goVersionString}" ]; + ldflags = [ + "-s" + "-w" + "-X github.com/ethersphere/bee.version=${version}" + "-X github.com/ethersphere/bee/pkg/api.Version=5.2.0" + "-X github.com/ethersphere/bee/pkg/api.DebugVersion=4.1.0" + "-X github.com/ethersphere/bee/pkg/p2p/libp2p.reachabilityOverridePublic=false" + "-X github.com/ethersphere/bee/pkg/postage/listener.batchFactorOverridePublic=5" + ]; - # Mimic the bee Makefile: without disabling CGO, two (transitive and - # unused) dependencies would fail to compile. - preBuild = '' - export CGO_ENABLED=0 - ''; + CGO_ENABLED = 0; postInstall = '' mkdir -p $out/lib/systemd/system @@ -65,11 +44,13 @@ buildGoModule { longDescription = '' A decentralised storage and communication system for a sovereign digital society. - Swarm is a system of peer-to-peer networked nodes that create a decentralised storage and communication service. The system is economically self-sustaining due to a built-in incentive system enforced through smart contracts on the Ethereum blockchain. + Swarm is a system of peer-to-peer networked nodes that create a decentralised storage + and communication service. The system is economically self-sustaining due to a built-in + incentive system enforced through smart contracts on the Ethereum blockchain. Bee is a Swarm node implementation, written in Go. ''; license = with licenses; [ bsd3 ]; - maintainers = with maintainers; [ attila-lendvai ]; + maintainers = with maintainers; [ ]; }; } |