terra-station: patch pre-built node modules
This commit is contained in:
parent
84d675aaa9
commit
bf0a52da05
1 changed files with 9 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
, bash
|
||||
, makeWrapper
|
||||
, electron
|
||||
, asar
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper asar ];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -48,6 +49,13 @@ stdenv.mkDerivation rec {
|
|||
cp -a usr/share/* $out/share
|
||||
cp -a "opt/Terra Station/"{locales,resources} $out/share/${pname}
|
||||
|
||||
# patch pre-built node modules
|
||||
asar e $out/share/${pname}/resources/app.asar asar-unpacked
|
||||
find asar-unpacked -name '*.node' -exec patchelf \
|
||||
--add-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
|
||||
{} \;
|
||||
asar p asar-unpacked $out/share/${pname}/resources/app.asar
|
||||
|
||||
substituteInPlace $out/share/applications/station-electron.desktop \
|
||||
--replace "/opt/Terra Station/station-electron" ${pname}
|
||||
|
||||
|
|
Loading…
Reference in a new issue