Merge pull request #139052 from figsoda/fishfight

fishfight: init at 0.1
This commit is contained in:
figsoda 2021-09-23 08:11:52 -04:00 committed by GitHub
commit be5509c55c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,62 @@
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, alsa-lib
, libGL
, libX11
, libXi
, AudioToolbox
, Cocoa
, CoreAudio
, CoreFoundation
, IOKit
, OpenGL
}:
rustPlatform.buildRustPackage rec {
pname = "fishfight";
version = "0.1";
src = fetchFromGitHub {
owner = "fishfight";
repo = pname;
rev = "v${version}";
sha256 = "0mbg9zshyg9hlbsk5npslbnwjf8fh6gxszi5hxks380z080cjxs2";
};
cargoSha256 = "sha256-fZXqJ6a2erAQSgAZRwmkor94eMryjiq3gbY102pJb9Q=";
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
libGL
libX11
libXi
] ++ lib.optionals stdenv.isDarwin [
AudioToolbox
Cocoa
CoreAudio
CoreFoundation
IOKit
OpenGL
];
postPatch = ''
substituteInPlace assets/levels/levels.toml --replace assets $out/share/assets
substituteInPlace src/gui.rs --replace \"assets \"$out/share/assets
substituteInPlace src/main.rs --replace \"assets \"$out/share/assets
'';
postInstall = ''
mkdir $out/share
cp -r assets $out/share
'';
meta = with lib; {
description = "A tactical 2D shooter played by up to 4 players online or on a shared screen";
homepage = "https://fishfight.org/";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ figsoda ];
mainProgram = "fishgame";
};
}

View File

@ -29262,6 +29262,11 @@ with pkgs;
fish-fillets-ng = callPackage ../games/fish-fillets-ng {};
fishfight = callPackage ../games/fishfight {
inherit (xorg) libX11 libXi;
inherit (darwin.apple_sdk.frameworks) AudioToolbox Cocoa CoreAudio CoreFoundation IOKit OpenGL;
};
flightgear = libsForQt5.callPackage ../games/flightgear { };
flock = callPackage ../development/tools/flock { };