2022-02-17 22:21:12 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, assimp
|
|
|
|
, curl
|
|
|
|
, freetype
|
|
|
|
#, glew
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libpng
|
|
|
|
, libsigcxx
|
|
|
|
, libvorbis
|
|
|
|
, lua5_2
|
|
|
|
, mesa
|
|
|
|
, SDL2
|
|
|
|
, SDL2_image
|
2017-12-17 04:43:10 +01:00
|
|
|
}:
|
|
|
|
|
2016-01-18 19:03:35 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-16 12:20:18 +02:00
|
|
|
pname = "pioneer";
|
2022-02-17 22:21:12 +01:00
|
|
|
version = "20220203";
|
2016-01-18 19:03:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub{
|
|
|
|
owner = "pioneerspacesim";
|
|
|
|
repo = "pioneer";
|
|
|
|
rev = version;
|
2022-02-17 22:21:12 +01:00
|
|
|
hash = "sha256-HNVg8Lq6k6gQDmgOdpnBwJ57WSEnn5XwtqzmkDU1WGI=";
|
2016-01-18 19:03:35 +01:00
|
|
|
};
|
|
|
|
|
2022-02-17 22:21:12 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'string(TIMESTAMP PROJECT_VERSION "%Y%m%d")' 'set(PROJECT_VERSION ${version})'
|
|
|
|
'';
|
|
|
|
|
2021-01-17 06:49:22 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2017-12-17 04:43:10 +01:00
|
|
|
|
2019-05-16 12:20:18 +02:00
|
|
|
buildInputs = [
|
2022-02-17 22:21:12 +01:00
|
|
|
assimp
|
|
|
|
curl
|
|
|
|
freetype
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libpng
|
|
|
|
libsigcxx
|
|
|
|
libvorbis
|
|
|
|
lua5_2
|
|
|
|
mesa
|
|
|
|
SDL2
|
|
|
|
SDL2_image
|
2016-01-18 19:03:35 +01:00
|
|
|
];
|
|
|
|
|
2022-02-17 22:21:12 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DPIONEER_DATA_DIR:PATH=${placeholder "out"}/share/pioneer/data"
|
|
|
|
"-DUSE_SYSTEM_LIBLUA:BOOL=YES"
|
|
|
|
];
|
2016-01-18 19:03:35 +01:00
|
|
|
|
2022-02-17 22:21:12 +01:00
|
|
|
makeFlags = [ "all" "build-data" ];
|
2021-08-20 15:03:00 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-12-17 04:43:10 +01:00
|
|
|
description = "A space adventure game set in the Milky Way galaxy at the turn of the 31st century";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://pioneerspacesim.net";
|
2016-01-18 19:03:35 +01:00
|
|
|
license = with licenses; [
|
2022-02-17 22:21:12 +01:00
|
|
|
gpl3Only cc-by-sa-30
|
2016-01-18 19:03:35 +01:00
|
|
|
];
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|