blob: f33cdb45bb2b614d751338ab26a9b4d75845c601 (
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
32
|
{ lib, buildGame, fetchGog, makeWrapper, nwjs }:
buildGame rec {
name = "crosscode-${version}";
version = "1.1.0";
src = fetchGog {
productId = 1252295864;
downloadName = "en3installer0";
sha256 = "1rqf1vlg151hxy5f9nwldmb4l3853dmvcf7fiakab8vzsmjmldlm";
};
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" ];
}
|