diff options
author | Emery Hemingway <emery@vfemail.net> | 2014-10-26 15:15:48 -0400 |
---|---|---|
committer | Aristid Breitkreuz <aristidb@gmail.com> | 2014-11-08 23:39:02 +0100 |
commit | 67a2a58314274ec5865d49198700eefd2c1a22a9 (patch) | |
tree | b0a17f20908bef5ec22877fd1cffe7224f4155ea /pkgs | |
parent | 9b4ba66ac3d1ac3dba325fcb1db45c8f7a57e103 (diff) | |
download | nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar.gz nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar.bz2 nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar.lz nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar.xz nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.tar.zst nixlib-67a2a58314274ec5865d49198700eefd2c1a22a9.zip |
cjdns: service tweaks, new NixOS test
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/networking/cjdns/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/networking/cjdns/makekeys-sigpipe.patch | 29 |
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index c32bc224bdde..cbaca948b2b2 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation { sha256 = "11z8dk7byxh9pfv7mhfvnk465qln1g7z8c8f822623d59lwjpbs1"; }; + # Make the NixOS service work a little better. + patches = [ ./makekeys-sigpipe.patch ]; + buildInputs = [ which python27 nodejs ] ++ # for flock stdenv.lib.optional stdenv.isLinux [ utillinux ]; diff --git a/pkgs/tools/networking/cjdns/makekeys-sigpipe.patch b/pkgs/tools/networking/cjdns/makekeys-sigpipe.patch new file mode 100644 index 000000000000..2b21f56709d0 --- /dev/null +++ b/pkgs/tools/networking/cjdns/makekeys-sigpipe.patch @@ -0,0 +1,29 @@ +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; |