git.iko.soy/typeable/nixpkgs
on master help sign in
snis: init at 20211017 (#142034)
commit27e10a3b92e9df8b899dd09b1dafab28f2303ff1 authorAlexandra <74795488+alyaeanyx@users.noreply.github.com> dateMon 24 Jan 2022, 01:03 (5 years ago) parent635d6e8
2 files changed+75
pkgs/games/snis/default.nix+73 pkgs/top-level/all-packages.nix+2
pkgs/games/snis/default.nixnew file+73
@@ -0,0 +1,73 @@
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, pkg-config
5+, coreutils
6+, portaudio
7+, libbsd
8+, libpng
9+, libvorbis
10+, SDL2
11+, makeWrapper
12+, lua5_2
13+, glew
14+, openssl
15+, picotts
16+, alsa-utils
17+, espeak-classic
18+, sox
19+, libopus
20+, openscad
21+}:
22+
23+stdenv.mkDerivation {
24+ pname = "snis_launcher";
25+ version = "unstable-2021-10-17";
26+
27+ src = fetchFromGitHub {
28+ owner = "smcameron";
29+ repo = "space-nerds-in-space";
30+ rev = "e70d3c63e33c940feb53c8d818ce2d8ea2aadf00";
31+ sha256 = "sha256-HVCb1iFn7GWNpedtFCgLyd0It8s4PEmUwDfb8ap1TDc=";
32+ };
33+
34+ postPatch = ''
35+ substituteInPlace Makefile \
36+ --replace "OPUSARCHIVE=libopus.a" "OPUSARCHIVE=" \
37+ --replace "-I./opus-1.3.1/include" "-I${libopus.dev}/include/opus"
38+ substituteInPlace snis_launcher \
39+ --replace "PREFIX=." "PREFIX=$out"
40+ substituteInPlace snis_text_to_speech.sh \
41+ --replace "pico2wave" "${sox}/bin/pico2wave" \
42+ --replace "espeak" "${espeak-classic}/bin/espeak" \
43+ --replace "play" "${sox}/bin/play" \
44+ --replace "aplay" "${alsa-utils}/bin/aplay" \
45+ --replace "/bin/rm" "${coreutils}/bin/rm"
46+ '';
47+
48+ nativeBuildInputs = [ pkg-config openscad makeWrapper ];
49+ buildInputs = [ coreutils portaudio libbsd libpng libvorbis SDL2 lua5_2 glew openssl picotts sox alsa-utils libopus ];
50+
51+ postBuild = ''
52+ make models -j$NIX_BUILD_CORES
53+ '';
54+
55+ installPhase = ''
56+ runHook preInstall
57+ mkdir -p $out
58+ cp -R share $out/share
59+ cp -R bin $out/bin
60+ cp snis_launcher $out/bin/
61+ # without this, snis_client crashes on Wayland
62+ wrapProgram $out/bin/snis_client --set SDL_VIDEODRIVER x11
63+ runHook postInstall
64+ '';
65+
66+ meta = with lib; {
67+ description = "Space Nerds In Space, a multi-player spaceship bridge simulator";
68+ homepage = "https://smcameron.github.io/space-nerds-in-space/";
69+ license = licenses.gpl2;
70+ maintainers = with maintainers; [ alyaeanyx ];
71+ platforms = platforms.linux;
72+ };
73+}
pkgs/top-level/all-packages.nix+2
@@ -31259,6 +31259,8 @@ with pkgs;
3125931259
3126031260 synthv1 = libsForQt5.callPackage ../applications/audio/synthv1 { };
3126131261
31262+ snis = callPackage ../games/snis { };
31263+
3126231264 system-syzygy = callPackage ../games/system-syzygy { };
3126331265
3126431266 t4kcommon = callPackage ../games/t4kcommon { };