nixpkgs/pkgs/tools/networking/cjdns/default.nix
Emery Hemingway 9f1bd2d419 cjdns: update 20141023 -> 20141121
include protocol version in package version string
2014-11-21 18:04:53 -05:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
let
version = "12"; # see ${src}/util/version/Version.h
date = "20141121";
in
stdenv.mkDerivation {
name = "cjdns-${version}-${date}";
src = fetchFromGitHub {
owner = "cjdelisle";
repo = "cjdns";
rev = "f176d2c0271d764412bd13c7adf7ea475fa25e0f";
sha256 = "02vp917pr0kkcg41ani2azfbmdv1rjghmlrc7nc07ckkcqg6sk0y";
};
buildInputs = [ which python27 nodejs ] ++
# for flock
stdenv.lib.optional stdenv.isLinux [ utillinux ];
buildPhase = "bash do";
installPhase = ''
installBin cjdroute makekeys privatetopublic publictoip6
sed -i 's,/usr/bin/env node,'$(type -P node), \
$(find contrib -name "*.js")
sed -i 's,/usr/bin/env python,'$(type -P python), \
$(find contrib -type f)
mkdir -p $out/share/cjdns
cp -R contrib node_build node_modules $out/share/cjdns/
'';
meta = with stdenv.lib; {
homepage = https://github.com/cjdelisle/cjdns;
description = "Encrypted networking for regular people";
license = licenses.gpl3;
maintainers = with maintainers; [ viric emery ];
platforms = platforms.unix;
};
}