pioneer: 20210723 -> 20220203

* pioneer: 20210723 -> 20220203 (#159679)

add missing deps mesa and lua5_2
use CMake flags to use Lua from nixpkgs
patch to use version tag instead of build date
use SPDX 3.0 license identifier

Co-authored-by: Renaud <c0bw3b@users.noreply.github.com>
This commit is contained in:
R. RyanTM 2022-02-17 13:21:12 -08:00 committed by GitHub
parent 97aeab9782
commit 2ba87397c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,37 +1,68 @@
{ fetchFromGitHub, lib, stdenv, cmake, pkg-config, curl, libsigcxx, SDL2 { lib
, SDL2_image, freetype, libvorbis, libpng, assimp, libGLU, libGL , stdenv
, glew , fetchFromGitHub
, cmake
, pkg-config
, assimp
, curl
, freetype
#, glew
, libGL
, libGLU
, libpng
, libsigcxx
, libvorbis
, lua5_2
, mesa
, SDL2
, SDL2_image
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pioneer"; pname = "pioneer";
version = "20210723"; version = "20220203";
src = fetchFromGitHub{ src = fetchFromGitHub{
owner = "pioneerspacesim"; owner = "pioneerspacesim";
repo = "pioneer"; repo = "pioneer";
rev = version; rev = version;
sha256 = "sha256-w+ECVv96MoS69815+X0PqguDiGDhHoTnAnnYtLpMScI="; hash = "sha256-HNVg8Lq6k6gQDmgOdpnBwJ57WSEnn5XwtqzmkDU1WGI=";
}; };
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace 'string(TIMESTAMP PROJECT_VERSION "%Y%m%d")' 'set(PROJECT_VERSION ${version})'
'';
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ buildInputs = [
curl libsigcxx SDL2 SDL2_image freetype libvorbis libpng assimp
assimp libGLU libGL glew curl
freetype
libGL
libGLU
libpng
libsigcxx
libvorbis
lua5_2
mesa
SDL2
SDL2_image
]; ];
preConfigure = '' cmakeFlags = [
export PIONEER_DATA_DIR="$out/share/pioneer/data"; "-DPIONEER_DATA_DIR:PATH=${placeholder "out"}/share/pioneer/data"
''; "-DUSE_SYSTEM_LIBLUA:BOOL=YES"
];
makeFlags = [ "build-data" ]; makeFlags = [ "all" "build-data" ];
meta = with lib; { meta = with lib; {
description = "A space adventure game set in the Milky Way galaxy at the turn of the 31st century"; description = "A space adventure game set in the Milky Way galaxy at the turn of the 31st century";
homepage = "https://pioneerspacesim.net"; homepage = "https://pioneerspacesim.net";
license = with licenses; [ license = with licenses; [
gpl3 cc-by-sa-30 gpl3Only cc-by-sa-30
]; ];
platforms = [ "x86_64-linux" "i686-linux" ]; platforms = [ "x86_64-linux" "i686-linux" ];
}; };