tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
terra-station: patch pre-built node modules
Maximilian Marx
2 years ago
bf0a52da
84d675aa
+9
-1
1 changed file
expand all
collapse all
unified
split
pkgs
applications
blockchains
terra-station
default.nix
+9
-1
pkgs/applications/blockchains/terra-station/default.nix
···
5
5
, bash
6
6
, makeWrapper
7
7
, electron
8
8
+
, asar
8
9
}:
9
10
10
11
let
···
31
32
inherit sha256;
32
33
};
33
34
34
34
-
nativeBuildInputs = [ makeWrapper ];
35
35
+
nativeBuildInputs = [ makeWrapper asar ];
35
36
36
37
dontConfigure = true;
37
38
dontBuild = true;
···
47
48
48
49
cp -a usr/share/* $out/share
49
50
cp -a "opt/Terra Station/"{locales,resources} $out/share/${pname}
51
51
+
52
52
+
# patch pre-built node modules
53
53
+
asar e $out/share/${pname}/resources/app.asar asar-unpacked
54
54
+
find asar-unpacked -name '*.node' -exec patchelf \
55
55
+
--add-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
56
56
+
{} \;
57
57
+
asar p asar-unpacked $out/share/${pname}/resources/app.asar
50
58
51
59
substituteInPlace $out/share/applications/station-electron.desktop \
52
60
--replace "/opt/Terra Station/station-electron" ${pname}