1 { version ? "release", stdenv, lib, fetchFromGitHub, go-ethereum }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "refs/tags/v${version}";
11 sha256 = "1sfwql0kvnir8b9ggpqcyc0ar995gxgfbhqb1xpfzp6wl0g3g4zz";
14 buildInputs = [ go-ethereum ];
16 clefBinary = "${go-ethereum}/bin/clef";
19 ./0001-clef-service-accept-default-CONFIGDIR-from-the-envir.patch
20 ./0002-nix-diff-for-substituteAll.patch
27 mkdir -p $out/share/bee-clef/
28 mkdir -p $out/lib/systemd/system/
29 cp packaging/bee-clef.service $out/lib/systemd/system/
30 substituteAll packaging/bee-clef-service $out/share/bee-clef/bee-clef-service
31 substituteAll ${./ensure-clef-account} $out/share/bee-clef/ensure-clef-account
32 substituteAll packaging/bee-clef-keys $out/bin/bee-clef-keys
33 cp packaging/rules.js packaging/4byte.json $out/share/bee-clef/
34 chmod +x $out/bin/bee-clef-keys
35 chmod +x $out/share/bee-clef/bee-clef-service
36 chmod +x $out/share/bee-clef/ensure-clef-account
41 # homepage = "https://gateway.ethswarm.org/bzz/docs.swarm.eth/docs/installation/bee-clef/";
42 homepage = "https://docs.ethswarm.org/docs/installation/bee-clef";
43 description = "External signer for Ethereum Swarm Bee";
45 clef is go-ethereum's external signer.
47 bee-clef is a package that starts up a vanilla clef instance as a systemd service,
48 but configured in such a way that is suitable for bee (relaxed security for
51 This package contains the files necessary to run the bee-clef service.
53 license = with licenses; [ bsd3 ];
54 maintainers = with maintainers; [ attila-lendvai ];
55 platforms = go-ethereum.meta.platforms;