forked from OpenRCT2/OpenRCT2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
shell.nix
70 lines (64 loc) · 1.55 KB
/
shell.nix
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ pkgs ? (
let
hostPkgs = import <nixpkgs> {};
pinnedPkgs = hostPkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs-channels";
rev = "08d245eb31a3de0ad73719372190ce84c1bf3aee";
sha256 = "1g22f8r3l03753s67faja1r0dq0w88723kkfagskzg9xy3qs8yw8";
};
in
import pinnedPkgs {}
)
}:
let
objects-src = pkgs.fetchFromGitHub {
owner = "OpenRCT2";
repo = "objects";
rev = "v1.0.10";
sha256 = "4f261964f1c01a04b7600d3d082fb4d3d9ec0d543c4eb66a819eb2ad01417aa0";
};
title-sequences-src = pkgs.fetchFromGitHub {
owner = "OpenRCT2";
repo = "title-sequences";
rev = "v0.1.2a";
sha256 = "7536dbd7c8b91554306e5823128f6bb7e94862175ef09d366d25e4bce573d155";
};
in
pkgs.stdenv.mkDerivation {
name = "openrct2";
src = ./.;
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=RELWITHDEBINFO"
"-DDOWNLOAD_OBJECTS=OFF"
"-DDOWNLOAD_TITLE_SEQUENCES=OFF"
];
postUnpack = ''
cp -r ${objects-src} $sourceRoot/data/object
cp -r ${title-sequences-src} $sourceRoot/data/title
'';
preFixup = "ln -s $out/share/openrct2 $out/bin/data";
makeFlags = ["all" "g2"];
buildInputs = [
pkgs.SDL2
pkgs.cmake
pkgs.curl
pkgs.fontconfig
pkgs.freetype
pkgs.icu
pkgs.jansson
pkgs.libiconv
pkgs.libpng
pkgs.libGLU
pkgs.libzip
pkgs.openssl
pkgs.pkgconfig
pkgs.speexdsp
pkgs.xorg.libpthreadstubs
pkgs.zlib
] ++ (pkgs.stdenv.lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.Foundation # osX hacks
pkgs.darwin.apple_sdk.frameworks.AppKit
pkgs.darwin.libobjc ]
);
}