snis: update to the latest commit
This commit is contained in:
@@ -1,43 +1,44 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, coreutils
|
||||
, portaudio
|
||||
, libbsd
|
||||
, libpng
|
||||
, libvorbis
|
||||
, SDL2
|
||||
, makeWrapper
|
||||
, lua5_2
|
||||
, glew
|
||||
, openssl
|
||||
, picotts
|
||||
, alsa-utils
|
||||
, espeak-classic
|
||||
, sox
|
||||
, libopus
|
||||
, openscad
|
||||
, libxcrypt
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
coreutils,
|
||||
portaudio,
|
||||
libbsd,
|
||||
libpng,
|
||||
libvorbis,
|
||||
SDL2,
|
||||
makeWrapper,
|
||||
lua5_2,
|
||||
glew,
|
||||
openssl,
|
||||
picotts,
|
||||
alsa-utils,
|
||||
espeak-classic,
|
||||
sox,
|
||||
libopus,
|
||||
openscad,
|
||||
libxcrypt-legacy,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "snis_launcher";
|
||||
version = "unstable-2021-10-17";
|
||||
version = "unstable-2024-08-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smcameron";
|
||||
repo = "space-nerds-in-space";
|
||||
rev = "e70d3c63e33c940feb53c8d818ce2d8ea2aadf00";
|
||||
sha256 = "sha256-HVCb1iFn7GWNpedtFCgLyd0It8s4PEmUwDfb8ap1TDc=";
|
||||
rev = "1dadfca31513561cf95f1229af34341bd1a1bb2a";
|
||||
sha256 = "sha256-Qi4lbq1rsayMdRWMAF44K2DNtlZxNUyjnO6kXCW5QhA=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "OPUSARCHIVE=libopus.a" "OPUSARCHIVE=" \
|
||||
--replace "-I./opus-1.3.1/include" "-I${libopus.dev}/include/opus"
|
||||
substituteInPlace snis_launcher \
|
||||
--replace "PREFIX=." "PREFIX=$out"
|
||||
substituteInPlace snis_text_to_speech.sh \
|
||||
--replace "pico2wave" "${sox}/bin/pico2wave" \
|
||||
--replace "espeak" "${espeak-classic}/bin/espeak" \
|
||||
@@ -46,23 +47,31 @@ stdenv.mkDerivation {
|
||||
--replace "/bin/rm" "${coreutils}/bin/rm"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config openscad makeWrapper ];
|
||||
buildInputs = [ coreutils portaudio libbsd libpng libvorbis SDL2 lua5_2 glew openssl picotts sox alsa-utils libopus libxcrypt ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
openscad
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
make models -j$NIX_BUILD_CORES
|
||||
'';
|
||||
buildInputs = [
|
||||
coreutils
|
||||
portaudio
|
||||
libbsd
|
||||
libpng
|
||||
libvorbis
|
||||
SDL2
|
||||
lua5_2
|
||||
glew
|
||||
openssl
|
||||
picotts
|
||||
sox
|
||||
alsa-utils
|
||||
libopus
|
||||
libxcrypt-legacy
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -R share $out/share
|
||||
cp -R bin $out/bin
|
||||
cp snis_launcher $out/bin/
|
||||
# without this, snis_client crashes on Wayland
|
||||
wrapProgram $out/bin/snis_client --set SDL_VIDEODRIVER x11
|
||||
runHook postInstall
|
||||
'';
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
buildTargets = [ "models" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Space Nerds In Space, a multi-player spaceship bridge simulator";
|
||||
|
||||
Reference in New Issue
Block a user