Merge pull request #286570 from atorres1985-contrib/nxengine-evo
nxengine-evo: 2.6.4 -> 2.6.5-1
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchzip
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "nxengine-assets";
|
||||
version = "2.6.5-1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nxengine/nxengine-evo/releases/download/v${finalAttrs.version}/NXEngine-Evo-v${finalAttrs.version}-Win64.zip";
|
||||
hash = "sha256-+PjjhJYL1yk67QJ7ixfpCRg1coQnSPpXDUIwsqp9aIM=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/nxengine/
|
||||
cp -r data/ $out/share/nxengine/data
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/nxengine/nxengine-evo";
|
||||
description = "Assets for nxengine-evo";
|
||||
license = with lib.licenses; [
|
||||
unfreeRedistributable
|
||||
];
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.all;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,92 @@
|
||||
{
|
||||
lib,
|
||||
SDL2,
|
||||
SDL2_mixer,
|
||||
callPackage,
|
||||
cmake,
|
||||
pkg-config,
|
||||
ninja,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
libpng,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nxengine-evo";
|
||||
version = "2.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nxengine";
|
||||
repo = "nxengine-evo";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-krK2b1E5JUMxRoEWmb3HZMNSIHfUUGXSpyb4/Zdp+5A=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix building by adding SDL_MIXER to include path
|
||||
(fetchpatch {
|
||||
url = "https://github.com/nxengine/nxengine-evo/commit/1890127ec4b4b5f8d6cb0fb30a41868e95659840.patch";
|
||||
hash = "sha256-wlsIdN2RugOo94V3qj/AzYgrs2kf0i1Iw5zNOP8WQqI=";
|
||||
})
|
||||
# Fix buffer overflow
|
||||
(fetchpatch {
|
||||
url = "https://github.com/nxengine/nxengine-evo/commit/75b8b8e3b067fd354baa903332f2a3254d1cc017.patch";
|
||||
hash = "sha256-fZVaZAOHgFoNakOR2MfsvRJjuLhbx+5id/bcN8w/WWo=";
|
||||
})
|
||||
# Add missing include
|
||||
(fetchpatch {
|
||||
url = "https://github.com/nxengine/nxengine-evo/commit/0076ebb11bcfec5dc5e2e923a50425f1a33a4133.patch";
|
||||
hash = "sha256-8j3fFFw8DMljV7aAFXE+eA+vkbz1HdFTMAJmk3BRU04=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
SDL2
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
SDL2_mixer
|
||||
libpng
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
# Allow finding game assets.
|
||||
postPatch = ''
|
||||
sed -i -e "s,/usr/share/,$out/share/," src/ResourceManager.cpp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cd ..
|
||||
mkdir -p $out/bin/ $out/share/nxengine/
|
||||
install bin/* $out/bin/
|
||||
'' + ''
|
||||
cp -r ${finalAttrs.finalPackage.assets}/share/nxengine/data $out/share/nxengine/data
|
||||
chmod -R a=r,a+X $out/share/nxengine/data
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
assets = callPackage ./assets.nix { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/nxengine/nxengine-evo";
|
||||
description = "A complete open-source clone/rewrite of the masterpiece jump-and-run platformer Doukutsu Monogatari (also known as Cave Story)";
|
||||
license = with lib.licenses; [
|
||||
gpl3Plus
|
||||
];
|
||||
mainProgram = "nx";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -1,68 +0,0 @@
|
||||
{ lib, stdenv
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, libpng
|
||||
, SDL2
|
||||
, SDL2_mixer
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nxengine-evo";
|
||||
version = "2.6.4";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nxengine";
|
||||
repo = "nxengine-evo";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-krK2b1E5JUMxRoEWmb3HZMNSIHfUUGXSpyb4/Zdp+5A=";
|
||||
};
|
||||
assets = fetchurl {
|
||||
url = "https://github.com/nxengine/nxengine-evo/releases/download/v${version}/NXEngine-v${version}-Linux.tar.xz";
|
||||
sha256 = "1b5hkmsrrhnjjf825ri6n62kb3fldwl7v5f1cqvqyv47zv15g5gy";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/nxengine/nxengine-evo/commit/1890127ec4b4b5f8d6cb0fb30a41868e95659840.patch";
|
||||
sha256 = "18j22vzkikcwqd42vlhzd6rjp26dq0zslxw5yyl07flivms0hny2";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/nxengine/nxengine-evo/commit/75b8b8e3b067fd354baa903332f2a3254d1cc017.patch";
|
||||
sha256 = "0sjr7z63gp7nfxifxisvp2w664mxxk3xi4a3d86mm0470dj5m5bx";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
libpng
|
||||
SDL2
|
||||
SDL2_mixer
|
||||
];
|
||||
|
||||
# Allow finding game assets.
|
||||
postPatch = ''
|
||||
sed -i -e "s,/usr/share/,$out/share/," src/ResourceManager.cpp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cd ..
|
||||
unpackFile ${assets}
|
||||
mkdir -p $out/bin/ $out/share/nxengine/
|
||||
install bin/* $out/bin/
|
||||
cp -r NXEngine-evo-${version}-Linux/data/ $out/share/nxengine/data
|
||||
chmod -R a=r,a+X $out/share/nxengine/data
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A complete open-source clone/rewrite of the masterpiece jump-and-run platformer Doukutsu Monogatari (also known as Cave Story)";
|
||||
license = with lib.licenses; [
|
||||
gpl3 # Game engine
|
||||
unfreeRedistributable # Game assets, freeware
|
||||
];
|
||||
maintainers = [ ];
|
||||
homepage = "https://github.com/nxengine/nxengine-evo";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -37187,8 +37187,6 @@ with pkgs;
|
||||
|
||||
nudoku = callPackage ../games/nudoku { };
|
||||
|
||||
nxengine-evo = callPackage ../games/nxengine-evo { };
|
||||
|
||||
oilrush = callPackage ../games/oilrush { };
|
||||
|
||||
onscripter-en = callPackage ../games/onscripter-en { };
|
||||
|
||||
Reference in New Issue
Block a user