2021-09-23 03:09:18 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
2022-07-30 07:12:21 +02:00
|
|
|
, pkg-config
|
2021-09-23 03:09:18 +02:00
|
|
|
, alsa-lib
|
|
|
|
, libGL
|
2022-10-14 00:16:16 +02:00
|
|
|
, xorg
|
2022-07-30 07:12:21 +02:00
|
|
|
, udev
|
2021-09-23 03:09:18 +02:00
|
|
|
, Cocoa
|
|
|
|
, OpenGL
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2022-08-03 05:02:48 +02:00
|
|
|
pname = "jumpy";
|
|
|
|
version = "0.4.3";
|
2021-09-23 03:09:18 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-08-03 05:02:48 +02:00
|
|
|
owner = "fishfolks";
|
2021-09-23 03:09:18 +02:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-03 05:02:48 +02:00
|
|
|
sha256 = "sha256-01zhiQi6v/8ZajsdBU+4hKUCj+PRJ/vUHluOIzy/Gi8=";
|
2021-09-23 03:09:18 +02:00
|
|
|
};
|
|
|
|
|
2022-08-03 05:02:48 +02:00
|
|
|
cargoSha256 = "sha256-AXaGuRqSFiq+Uiy+UaqPdPVyDhCogC64KZZ0Ah1Yo7A=";
|
2021-09-23 03:09:18 +02:00
|
|
|
|
2022-07-30 07:12:21 +02:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-12-12 05:07:02 +01:00
|
|
|
|
2022-07-30 07:12:21 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
2021-09-23 03:09:18 +02:00
|
|
|
alsa-lib
|
|
|
|
libGL
|
2022-10-14 00:16:16 +02:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXi
|
2022-07-30 07:12:21 +02:00
|
|
|
udev
|
2021-09-23 03:09:18 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Cocoa
|
|
|
|
OpenGL
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-07-30 07:12:21 +02:00
|
|
|
substituteInPlace src/main.rs \
|
|
|
|
--replace ./assets $out/share/assets \
|
|
|
|
--replace ./mods $out/share/mods
|
2021-09-23 03:09:18 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir $out/share
|
2022-07-30 07:12:21 +02:00
|
|
|
cp -r assets mods $out/share
|
2021-09-23 03:09:18 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|