nixpkgs/pkgs/games/jumpy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.1 KiB
Nix
Raw Normal View History

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
, xorg
2022-07-30 07:12:21 +02:00
, udev
2021-09-23 03:09:18 +02:00
, Cocoa
, OpenGL
}:
rustPlatform.buildRustPackage rec {
pname = "jumpy";
version = "0.4.3";
2021-09-23 03:09:18 +02:00
src = fetchFromGitHub {
owner = "fishfolks";
2021-09-23 03:09:18 +02:00
repo = pname;
rev = "v${version}";
sha256 = "sha256-01zhiQi6v/8ZajsdBU+4hKUCj+PRJ/vUHluOIzy/Gi8=";
2021-09-23 03:09:18 +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
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 ];
};
}