Merge pull request #4059 from matejc/zed_n_nodewebkit
Zed and nodewebkit
This commit is contained in:
commit
d45fc25035
@ -1,19 +1,9 @@
|
||||
{ stdenv, buildEnv, fetchgit, xlibs, glib, gtk2, atk, pango, gdk_pixbuf,
|
||||
cairo, freetype, fontconfig, nss, nspr, gnome, alsaLib, expat, dbus, udev,
|
||||
makeWrapper, writeScript, fetchurl, zip, pkgs, node_webkit }:
|
||||
{ stdenv, buildEnv, fetchgit, makeWrapper, writeScript, fetchurl, zip, pkgs
|
||||
, node_webkit }:
|
||||
|
||||
let
|
||||
name = "zed-${version}";
|
||||
version = "0.12";
|
||||
|
||||
rpath_env = buildEnv {
|
||||
name = "rpath_env";
|
||||
paths = [ xlibs.libX11 xlibs.libXrender glib xlibs.libXtst gtk2 atk pango
|
||||
gdk_pixbuf cairo freetype fontconfig xlibs.libXi xlibs.libXcomposite
|
||||
nss nspr gnome.GConf xlibs.libXext xlibs.libXfixes alsaLib
|
||||
xlibs.libXdamage expat dbus stdenv.gcc ];
|
||||
pathsToLink = [ "/lib" "/lib64" ];
|
||||
};
|
||||
version = "0.13";
|
||||
|
||||
# When upgrading node.nix / node packages:
|
||||
# fetch package.json from Zed's repository
|
||||
@ -29,8 +19,10 @@ let
|
||||
|
||||
node_env = buildEnv {
|
||||
name = "node_env";
|
||||
paths = [ nodePackages.tar nodePackages.request ];
|
||||
paths = [ nodePackages."body-parser" nodePackages.express
|
||||
nodePackages.request nodePackages.tar nodePackages.ws ];
|
||||
pathsToLink = [ "/lib" ];
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
zed = stdenv.mkDerivation rec {
|
||||
@ -39,7 +31,7 @@ let
|
||||
src = fetchgit {
|
||||
url = "git://github.com/zedapp/zed";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "1l1adj4p916km626vxg1lv0bapzay4z5nq005pxsbjbcycrhds59";
|
||||
sha256 = "023nq4y6dgh57xpsgawdn2zqvfyhjz1p00ldnsfsjajyy4nn6yb1";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper zip ];
|
||||
@ -62,14 +54,7 @@ let
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/zed/zed-bin
|
||||
patchelf --set-rpath "${rpath_env}/lib:${rpath_env}/lib64" $out/zed/zed-bin
|
||||
|
||||
mkdir -p $out/lib
|
||||
ln -s ${udev}/lib/libudev.so.1 $out/lib/libudev.so.0
|
||||
|
||||
wrapProgram $out/zed/zed-bin \
|
||||
--prefix LD_LIBRARY_PATH : $out/lib \
|
||||
--prefix NODE_PATH : ${node_env}/lib/node_modules
|
||||
'';
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,8 +9,9 @@ let
|
||||
name = "node-webkit-env";
|
||||
paths = [
|
||||
xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
|
||||
freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage xlibs.libXext
|
||||
xlibs.libXfixes nss nspr gconf expat dbus udev stdenv.gcc.gcc
|
||||
freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage
|
||||
xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.gcc.gcc
|
||||
xlibs.libXtst xlibs.libXi
|
||||
];
|
||||
};
|
||||
|
||||
@ -19,28 +20,27 @@ in stdenv.mkDerivation rec {
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://s3.amazonaws.com/node-webkit/v${version}/node-webkit-v${version}-linux-${bits}.tar.gz";
|
||||
url = "http://dl.node-webkit.org/v${version}/node-webkit-v${version}-linux-${bits}.tar.gz";
|
||||
sha256 = if bits == "x64" then
|
||||
"04b9hgrxxnvrzyc7kmlabvrfbzj9d6lif7z69zgsbn3x25nxxd2n" else
|
||||
"0icwdl564sbx27124js1l4whfld0n6nbysdd522frzk1759dzgri";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nw
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nwsnapshot
|
||||
'';
|
||||
|
||||
installPhase = let
|
||||
LD_LIBRARY_PATH = "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit";
|
||||
in ''
|
||||
mkdir -p $out/bin
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/node-webkit
|
||||
cp -R * $out/share/node-webkit
|
||||
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
|
||||
makeWrapper $out/share/node-webkit/nw $out/bin/nw --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
|
||||
makeWrapper $out/share/node-webkit/nwsnapshot $out/bin/nwsnapshot --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/share/node-webkit/nw $out/bin
|
||||
ln -s $out/share/node-webkit/nwsnapshot $out/bin
|
||||
'';
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
Loading…
Reference in New Issue
Block a user