mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
446bfd7430
Diff: https://github.com/fishfolk/jumpy/compare/v0.4.3...v0.5.1 Changelog: https://github.com/fishfolk/jumpy/releases/tag/v0.5.1
75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, makeWrapper
|
|
, pkg-config
|
|
, alsa-lib
|
|
, libxkbcommon
|
|
, udev
|
|
, vulkan-loader
|
|
, wayland
|
|
, xorg
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "jumpy";
|
|
version = "0.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fishfolk";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-5hgd4t9ZKHmv8wzED7Tn+ykzUM0EbQqRX15HBHzXtJY=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-cK5n75T+Kkd6F4q4MFZNn0R6W6Nk2/H23AGhIe2FCig=";
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
alsa-lib
|
|
libxkbcommon
|
|
udev
|
|
vulkan-loader
|
|
wayland
|
|
xorg.libX11
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
xorg.libXi
|
|
xorg.libXrandr
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Cocoa
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
postPatch = ''
|
|
touch ../$(stripHash $cargoDeps)/taffy/README.md
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir $out/share
|
|
cp -r assets $out/share
|
|
wrapProgram $out/bin/jumpy \
|
|
--set-default JUMPY_ASSET_DIR $out/share/assets
|
|
'';
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
patchelf $out/bin/.jumpy-wrapped \
|
|
--add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A tactical 2D shooter played by up to 4 players online or on a shared screen";
|
|
homepage = "https://fishfight.org/";
|
|
changelog = "https://github.com/fishfolk/jumpy/releases/tag/v${version}";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|