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