forked from mirrors/nixpkgs
cjdns: update 20141023 -> 20141121
include protocol version in package version string
This commit is contained in:
parent
30597a9c7a
commit
9f1bd2d419
|
@ -1,22 +1,19 @@
|
|||
{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
|
||||
|
||||
let
|
||||
date = "20141023";
|
||||
rev = "c7eed6b14688458e16fab368f68904e530651a30";
|
||||
version = "12"; # see ${src}/util/version/Version.h
|
||||
date = "20141121";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "cjdns-${date}-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
name = "cjdns-${version}-${date}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cjdelisle";
|
||||
repo = "cjdns";
|
||||
inherit rev;
|
||||
sha256 = "11z8dk7byxh9pfv7mhfvnk465qln1g7z8c8f822623d59lwjpbs1";
|
||||
rev = "f176d2c0271d764412bd13c7adf7ea475fa25e0f";
|
||||
sha256 = "02vp917pr0kkcg41ani2azfbmdv1rjghmlrc7nc07ckkcqg6sk0y";
|
||||
};
|
||||
|
||||
# Make the NixOS service work a little better.
|
||||
patches = [ ./makekeys-sigpipe.patch ];
|
||||
|
||||
buildInputs = [ which python27 nodejs ] ++
|
||||
# for flock
|
||||
stdenv.lib.optional stdenv.isLinux [ utillinux ];
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
diff --git a/contrib/c/makekeys.c b/contrib/c/makekeys.c
|
||||
index 29582f1..555cf85 100644
|
||||
--- a/contrib/c/makekeys.c
|
||||
+++ b/contrib/c/makekeys.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "crypto_scalarmult_curve25519.h"
|
||||
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
@@ -35,6 +36,8 @@ int main(int argc, char** argv)
|
||||
uint8_t hexPrivateKey[65];
|
||||
uint8_t printedIp[40];
|
||||
|
||||
+ signal(SIGPIPE,SIG_DFL);
|
||||
+
|
||||
for (;;) {
|
||||
Random_bytes(rand, privateKey, 32);
|
||||
crypto_scalarmult_curve25519_base(publicKey, privateKey);
|
||||
@@ -43,6 +46,7 @@ int main(int argc, char** argv)
|
||||
Base32_encode(publicKeyBase32, 53, publicKey, 32);
|
||||
AddrTools_printShortIp(printedIp, ip);
|
||||
printf("%s %s %s.k\n", hexPrivateKey, printedIp, publicKeyBase32);
|
||||
+ fflush(stdout);
|
||||
}
|
||||
}
|
||||
return 0;
|
Loading…
Reference in a new issue