diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-02-01 12:37:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 12:37:36 +0100 |
commit | da0d1a324f05cf5b8ec075bff818eb0a3bea1ca7 (patch) | |
tree | 5711d6ab1375823887c49dc3eb87a39c6f264813 /pkgs/applications/networking/bee/bee-clef.nix | |
parent | 1474f873f7ef785b7f6b90023f982d725f9bd244 (diff) | |
parent | c61c0cc04f46dd80b9dd165ae5cc7816d89c341f (diff) |
Merge pull request #109393 from attila-lendvai/attila-bee.master
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; + }; +} |