2023-07-27 04:25:51 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
|
|
|
, SDL2
|
|
|
|
, perl
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gtk3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "jfsw";
|
2024-03-08 01:15:51 +01:00
|
|
|
version = "20240303";
|
2023-07-27 04:25:51 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonof";
|
|
|
|
repo = "jfsw";
|
|
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
|
|
fetchSubmodules = true;
|
2024-03-08 01:15:51 +01:00
|
|
|
hash = "sha256-bOUgRa9zWufTFEj5huXAKeRerV8PqfqQVDoVUvRrj2I=";
|
2023-07-27 04:25:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
|
|
|
SDL2
|
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 sw -t $out/bin
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Modern port the original Shadow Warrior";
|
|
|
|
homepage = "http://www.jonof.id.au/jfsw/";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
mainProgram = "sw";
|
|
|
|
maintainers = with lib.maintainers; [ moody ];
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
inherit (SDL2.meta) platforms;
|
|
|
|
};
|
|
|
|
})
|