diff options
Diffstat (limited to 'pkgs/applications/networking/bee/bee-clef.nix')
-rw-r--r-- | pkgs/applications/networking/bee/bee-clef.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/networking/bee/bee-clef.nix b/pkgs/applications/networking/bee/bee-clef.nix new file mode 100644 index 000000000000..a94386ea3f11 --- /dev/null +++ b/pkgs/applications/networking/bee/bee-clef.nix @@ -0,0 +1,57 @@ +{ version ? "release", stdenv, lib, substituteAll, fetchFromGitHub, go-ethereum }: + +stdenv.mkDerivation rec { + pname = "bee-clef"; + version = "0.4.7"; + + src = fetchFromGitHub { + owner = "ethersphere"; + repo = "bee-clef"; + rev = "refs/tags/v${version}"; + sha256 = "1sfwql0kvnir8b9ggpqcyc0ar995gxgfbhqb1xpfzp6wl0g3g4zz"; + }; + + buildInputs = [ go-ethereum ]; + + clefBinary = "${go-ethereum}/bin/clef"; + + patches = [ + ./0001-clef-service-accept-default-CONFIGDIR-from-the-envir.patch + ./0002-nix-diff-for-substituteAll.patch + ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin/ + mkdir -p $out/share/bee-clef/ + mkdir -p $out/lib/systemd/system/ + cp packaging/bee-clef.service $out/lib/systemd/system/ + substituteAll packaging/bee-clef-service $out/share/bee-clef/bee-clef-service + substituteAll ${./ensure-clef-account} $out/share/bee-clef/ensure-clef-account + substituteAll packaging/bee-clef-keys $out/bin/bee-clef-keys + cp packaging/rules.js packaging/4byte.json $out/share/bee-clef/ + chmod +x $out/bin/bee-clef-keys + chmod +x $out/share/bee-clef/bee-clef-service + chmod +x $out/share/bee-clef/ensure-clef-account + patchShebangs $out/ + ''; + + meta = with lib; { + # homepage = "https://gateway.ethswarm.org/bzz/docs.swarm.eth/docs/installation/bee-clef/"; + homepage = "https://docs.ethswarm.org/docs/installation/bee-clef"; + description = "External signer for Ethereum Swarm Bee"; + longDescription = '' + clef is go-ethereum's external signer. + + bee-clef is a package that starts up a vanilla clef instance as a systemd service, + but configured in such a way that is suitable for bee (relaxed security for + automated operation). + + This package contains the files necessary to run the bee-clef service. + ''; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ attila-lendvai ]; + platforms = go-ethereum.meta.platforms; + }; +} |