nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 74 lines 1.9 kB view raw
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, libxcrypt 22}: 23 24stdenv.mkDerivation { 25 pname = "snis_launcher"; 26 version = "unstable-2021-10-17"; 27 28 src = fetchFromGitHub { 29 owner = "smcameron"; 30 repo = "space-nerds-in-space"; 31 rev = "e70d3c63e33c940feb53c8d818ce2d8ea2aadf00"; 32 sha256 = "sha256-HVCb1iFn7GWNpedtFCgLyd0It8s4PEmUwDfb8ap1TDc="; 33 }; 34 35 postPatch = '' 36 substituteInPlace Makefile \ 37 --replace "OPUSARCHIVE=libopus.a" "OPUSARCHIVE=" \ 38 --replace "-I./opus-1.3.1/include" "-I${libopus.dev}/include/opus" 39 substituteInPlace snis_launcher \ 40 --replace "PREFIX=." "PREFIX=$out" 41 substituteInPlace snis_text_to_speech.sh \ 42 --replace "pico2wave" "${sox}/bin/pico2wave" \ 43 --replace "espeak" "${espeak-classic}/bin/espeak" \ 44 --replace "play" "${sox}/bin/play" \ 45 --replace "aplay" "${alsa-utils}/bin/aplay" \ 46 --replace "/bin/rm" "${coreutils}/bin/rm" 47 ''; 48 49 nativeBuildInputs = [ pkg-config openscad makeWrapper ]; 50 buildInputs = [ coreutils portaudio libbsd libpng libvorbis SDL2 lua5_2 glew openssl picotts sox alsa-utils libopus libxcrypt ]; 51 52 postBuild = '' 53 make models -j$NIX_BUILD_CORES 54 ''; 55 56 installPhase = '' 57 runHook preInstall 58 mkdir -p $out 59 cp -R share $out/share 60 cp -R bin $out/bin 61 cp snis_launcher $out/bin/ 62 # without this, snis_client crashes on Wayland 63 wrapProgram $out/bin/snis_client --set SDL_VIDEODRIVER x11 64 runHook postInstall 65 ''; 66 67 meta = with lib; { 68 description = "Space Nerds In Space, a multi-player spaceship bridge simulator"; 69 homepage = "https://smcameron.github.io/space-nerds-in-space/"; 70 license = licenses.gpl2; 71 maintainers = with maintainers; [ alyaeanyx ]; 72 platforms = platforms.linux; 73 }; 74}