blob: 02ce6c1c438f3acd2bd95d0b4d961ee20601556b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{ lib, buildGame, fetchGog, makeWrapper, nwjs }:
buildGame rec {
name = "crosscode-${version}";
version = "1.3.0";
src = fetchGog {
productId = 1252295864;
sha256 = "1rva28gi6qf4cknpazqcyz3vawpcw828rj99jd4fr36y6p5c1h5c";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
substituteInPlace package.json --replace assets/ ""
# Remove Greenworks (Steamworks integration)
rm -r assets/modules
'';
installPhase = ''
mkdir -p "$out/share" "$out/bin"
cp -r assets "$out/share/crosscode"
install -vD -m 0644 package.json "$out/share/crosscode/package.json"
makeWrapper ${lib.escapeShellArg "${nwjs}/bin/nw"} "$out/bin/crosscode" \
--run "cd '$out/share/crosscode'" --add-flags .
'';
sandbox.paths.required = [ "$XDG_CONFIG_HOME/CrossCode" ];
}
|