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:
parent
fd5f455a73
commit
f3d978be65
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, nodejs, which, python27 }:
|
{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
|
||||||
|
|
||||||
let
|
let
|
||||||
date = "20141023";
|
date = "20141023";
|
||||||
@ -14,10 +14,20 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "11z8dk7byxh9pfv7mhfvnk465qln1g7z8c8f822623d59lwjpbs1";
|
sha256 = "11z8dk7byxh9pfv7mhfvnk465qln1g7z8c8f822623d59lwjpbs1";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ which python27 nodejs];
|
buildInputs = [ which python27 nodejs ] ++
|
||||||
|
# for flock
|
||||||
|
stdenv.lib.optional stdenv.isLinux [ utillinux ];
|
||||||
|
|
||||||
buildPhase = "bash do";
|
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; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/cjdelisle/cjdns;
|
homepage = https://github.com/cjdelisle/cjdns;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user