mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{ 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.3.6";
|
|
sha256 = "db9c3806a09cf2031f62f8e75cdc014376ec91d3c97e5764f747a88c8d8faf40";
|
|
};
|
|
|
|
title-sequences-src = pkgs.fetchFromGitHub {
|
|
owner = "OpenRCT2";
|
|
repo = "title-sequences";
|
|
rev = "v0.4.0";
|
|
sha256 = "6e7c7b554717072bfc7acb96fd0101dc8e7f0ea0ea316367a05c2e92950c9029";
|
|
};
|
|
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/sequence
|
|
'';
|
|
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 ]
|
|
);
|
|
}
|