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