mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
fishfight: 0.3 -> 0.4.2
This commit is contained in:
parent
2ad1c334f1
commit
9efd461883
@ -2,54 +2,53 @@
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, SDL2
|
||||
, pkg-config
|
||||
, alsa-lib
|
||||
, libGL
|
||||
, libX11
|
||||
, libXi
|
||||
, AudioToolbox
|
||||
, udev
|
||||
, Cocoa
|
||||
, CoreAudio
|
||||
, OpenGL
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "fishfight";
|
||||
version = "0.3";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fishfight";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kLdk7zTICZ8iawNttTsWUVKGvh2zykXVsMqUyYoGrBs=";
|
||||
sha256 = "sha256-q1Hh4P/huoFuW/+Mb9yKUMKaky1RshGpjrObBHRCk+8=";
|
||||
};
|
||||
|
||||
# use system sdl2 instead of bundled sdl2
|
||||
cargoPatches = [ ./use-system-sdl2.patch ];
|
||||
cargoSha256 = "sha256-PEGK95eXIHv2sxSwUU4345KtxDyRJn/+aEiJIDmkq6Y=";
|
||||
|
||||
cargoSha256 = "sha256-KQiqUzdsVMIjDmmreihekrrFoXeyNzd6ZbqApwH8B4Q=";
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
buildInputs = lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
libGL
|
||||
libX11
|
||||
libXi
|
||||
udev
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
AudioToolbox
|
||||
Cocoa
|
||||
CoreAudio
|
||||
OpenGL
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/main.rs --replace ./assets $out/share/assets
|
||||
substituteInPlace src/main.rs \
|
||||
--replace ./assets $out/share/assets \
|
||||
--replace ./mods $out/share/mods
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/share
|
||||
cp -r assets $out/share
|
||||
cp -r assets mods $out/share
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,39 +0,0 @@
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -96,15 +96,6 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
-[[package]]
|
||||
-name = "cmake"
|
||||
-version = "0.1.46"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "color_quant"
|
||||
version = "1.1.0"
|
||||
@@ -605,7 +596,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94cb479353c0603785c834e2307440d83d196bf255f204f7f6741358de8d6a2f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
- "cmake",
|
||||
"libc",
|
||||
"version-compare",
|
||||
]
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index d2af29e..a813f30 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -14,7 +14,7 @@ macroquad-profiler = "0.1"
|
||||
|
||||
ff-particles = { version = "0.1", features = ["serde"] }
|
||||
|
||||
-fishsticks = { version = "0.2.0", features = ["bundled-sdl2"] }
|
||||
+fishsticks = "0.2.0"
|
||||
|
||||
stunclient = { git = "https://github.com/not-fl3/rust-stunclient", default-features = false }
|
||||
|
@ -32484,7 +32484,7 @@ with pkgs;
|
||||
|
||||
fishfight = callPackage ../games/fishfight {
|
||||
inherit (xorg) libX11 libXi;
|
||||
inherit (darwin.apple_sdk.frameworks) AudioToolbox Cocoa CoreAudio OpenGL;
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
|
||||
};
|
||||
|
||||
flightgear = libsForQt5.callPackage ../games/flightgear { };
|
||||
|
Loading…
Reference in New Issue
Block a user