mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
properly patch nodewebkit
This commit is contained in:
parent
e0eb4c5bc5
commit
77fa9da425
@ -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