cjdns: installing contrib scripts

I made the nodejs and python scripts have the proper shebang. A lot more
of them could be updated to reference store paths (calls to "python",
etc.)

(cherry picked from commit 2fb382afb6319065f20af22d86774df190beb0d5)
This commit is contained in:
Lluís Batlle i Rossell 2014-10-25 15:51:47 +02:00
parent fd5f455a73
commit f3d978be65
1 changed files with 13 additions and 3 deletions

View File

@ -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;