diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index 4403018a391..c32bc224bdd 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, nodejs, which, python27 }: +{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }: let date = "20141023"; @@ -14,10 +14,20 @@ stdenv.mkDerivation { sha256 = "11z8dk7byxh9pfv7mhfvnk465qln1g7z8c8f822623d59lwjpbs1"; }; - buildInputs = [ which python27 nodejs]; + buildInputs = [ which python27 nodejs ] ++ + # for flock + stdenv.lib.optional stdenv.isLinux [ utillinux ]; buildPhase = "bash do"; - installPhase = "installBin cjdroute makekeys privatetopublic publictoip6"; + 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;