generate-secrets: fetch rpcauth.py from github

No need to vendor this.
This commit is contained in:
Erik Arvstedt
2020-08-27 12:20:06 +02:00
parent 4d6127bb76
commit ca18ffb90a
2 changed files with 8 additions and 48 deletions
+8 -2
View File
@@ -1,9 +1,15 @@
{ pkgs }: with pkgs;
let
rpcauth = pkgs.writeScriptBin "rpcauth" (builtins.readFile ./rpcauth/rpcauth.py);
rpcauthSrc = builtins.fetchurl {
url = "https://raw.githubusercontent.com/bitcoin/bitcoin/d6cde007db9d3e6ee93bd98a9bbfdce9bfa9b15b/share/rpcauth/rpcauth.py";
sha256 = "189mpplam6yzizssrgiyv70c9899ggh8cac76j4n7v0xqzfip07n";
};
rpcauth = pkgs.writeScriptBin "rpcauth" ''
exec ${pkgs.python35}/bin/python ${rpcauthSrc} "$@"
'';
in
writeScript "generate-secrets" ''
export PATH=${lib.makeBinPath [ coreutils apg openssl gnugrep rpcauth python35 ]}
export PATH=${lib.makeBinPath [ coreutils apg openssl gnugrep rpcauth ]}
. ${./generate-secrets.sh} ${./openssl.cnf}
''