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>

authored by R. RyanTM Renaud and committed by GitHub 2ba87397 97aeab97

+43 -12
+43 -12
pkgs/games/pioneer/default.nix
··· 1 - { fetchFromGitHub, lib, stdenv, cmake, pkg-config, curl, libsigcxx, SDL2 2 - , SDL2_image, freetype, libvorbis, libpng, assimp, libGLU, libGL 3 - , glew 4 }: 5 6 stdenv.mkDerivation rec { 7 pname = "pioneer"; 8 - version = "20210723"; 9 10 src = fetchFromGitHub{ 11 owner = "pioneerspacesim"; 12 repo = "pioneer"; 13 rev = version; 14 - sha256 = "sha256-w+ECVv96MoS69815+X0PqguDiGDhHoTnAnnYtLpMScI="; 15 }; 16 17 nativeBuildInputs = [ cmake pkg-config ]; 18 19 buildInputs = [ 20 - curl libsigcxx SDL2 SDL2_image freetype libvorbis libpng 21 - assimp libGLU libGL glew 22 ]; 23 24 - preConfigure = '' 25 - export PIONEER_DATA_DIR="$out/share/pioneer/data"; 26 - ''; 27 28 - makeFlags = [ "build-data" ]; 29 30 meta = with lib; { 31 description = "A space adventure game set in the Milky Way galaxy at the turn of the 31st century"; 32 homepage = "https://pioneerspacesim.net"; 33 license = with licenses; [ 34 - gpl3 cc-by-sa-30 35 ]; 36 platforms = [ "x86_64-linux" "i686-linux" ]; 37 };
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , assimp 7 + , curl 8 + , freetype 9 + #, glew 10 + , libGL 11 + , libGLU 12 + , libpng 13 + , libsigcxx 14 + , libvorbis 15 + , lua5_2 16 + , mesa 17 + , SDL2 18 + , SDL2_image 19 }: 20 21 stdenv.mkDerivation rec { 22 pname = "pioneer"; 23 + version = "20220203"; 24 25 src = fetchFromGitHub{ 26 owner = "pioneerspacesim"; 27 repo = "pioneer"; 28 rev = version; 29 + hash = "sha256-HNVg8Lq6k6gQDmgOdpnBwJ57WSEnn5XwtqzmkDU1WGI="; 30 }; 31 32 + postPatch = '' 33 + substituteInPlace CMakeLists.txt \ 34 + --replace 'string(TIMESTAMP PROJECT_VERSION "%Y%m%d")' 'set(PROJECT_VERSION ${version})' 35 + ''; 36 + 37 nativeBuildInputs = [ cmake pkg-config ]; 38 39 buildInputs = [ 40 + assimp 41 + curl 42 + freetype 43 + libGL 44 + libGLU 45 + libpng 46 + libsigcxx 47 + libvorbis 48 + lua5_2 49 + mesa 50 + SDL2 51 + SDL2_image 52 ]; 53 54 + cmakeFlags = [ 55 + "-DPIONEER_DATA_DIR:PATH=${placeholder "out"}/share/pioneer/data" 56 + "-DUSE_SYSTEM_LIBLUA:BOOL=YES" 57 + ]; 58 59 + makeFlags = [ "all" "build-data" ]; 60 61 meta = with lib; { 62 description = "A space adventure game set in the Milky Way galaxy at the turn of the 31st century"; 63 homepage = "https://pioneerspacesim.net"; 64 license = with licenses; [ 65 + gpl3Only cc-by-sa-30 66 ]; 67 platforms = [ "x86_64-linux" "i686-linux" ]; 68 };