Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 57 lines 1.7 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5}: 6 7buildGoModule rec { 8 pname = "bee"; 9 version = "2.6.0"; 10 11 src = fetchFromGitHub { 12 owner = "ethersphere"; 13 repo = "bee"; 14 rev = "v${version}"; 15 hash = "sha256-Yz23iVYGZ4PS1jbV5zFaCEsQOoAbHBpePml0zp5GSkQ="; 16 }; 17 18 vendorHash = "sha256-0czsloD2EhSWKQbj7NJ4IqGgKM9+Vp8gSIhOKWg/onA="; 19 20 subPackages = [ "cmd/bee" ]; 21 22 ldflags = [ 23 "-s" 24 "-w" 25 "-X github.com/ethersphere/bee/v2.version=${version}" 26 "-X github.com/ethersphere/bee/v2/pkg/api.Version=5.2.0" 27 "-X github.com/ethersphere/bee/v2/pkg/api.DebugVersion=4.1.1" 28 "-X github.com/ethersphere/bee/v2/pkg/p2p/libp2p.reachabilityOverridePublic=false" 29 "-X github.com/ethersphere/bee/v2/pkg/postage/listener.batchFactorOverridePublic=5" 30 ]; 31 32 env.CGO_ENABLED = 0; 33 34 postInstall = '' 35 mkdir -p $out/lib/systemd/system 36 cp packaging/bee.service $out/lib/systemd/system/ 37 cp packaging/bee-get-addr $out/bin/ 38 chmod +x $out/bin/bee-get-addr 39 patchShebangs $out/bin/ 40 ''; 41 42 meta = with lib; { 43 homepage = "https://github.com/ethersphere/bee"; 44 description = "Ethereum Swarm Bee"; 45 longDescription = '' 46 A decentralised storage and communication system for a sovereign digital society. 47 48 Swarm is a system of peer-to-peer networked nodes that create a decentralised storage 49 and communication service. The system is economically self-sustaining due to a built-in 50 incentive system enforced through smart contracts on the Ethereum blockchain. 51 52 Bee is a Swarm node implementation, written in Go. 53 ''; 54 license = with licenses; [ bsd3 ]; 55 maintainers = [ ]; 56 }; 57}