2022-06-03 15:15:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, makeWrapper
|
|
|
|
, copyDesktopItems
|
|
|
|
, makeDesktopItem
|
2024-01-11 09:41:25 +00:00
|
|
|
, faudio
|
2022-06-03 15:15:52 +00:00
|
|
|
, physfs
|
|
|
|
, SDL2
|
|
|
|
, tinyxml-2
|
|
|
|
, Foundation
|
|
|
|
, IOKit
|
|
|
|
, makeAndPlay ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vvvvvv";
|
2024-03-29 20:09:57 +00:00
|
|
|
version = "2.4.1";
|
2022-06-03 15:15:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TerryCavanagh";
|
|
|
|
repo = "VVVVVV";
|
|
|
|
rev = version;
|
2024-07-14 10:59:26 +00:00
|
|
|
hash = "sha256-HosrYBzx1Kh7rQIH7IAoOTPgpm4lgYOVR3MWtWX3usQ=";
|
2024-01-11 09:41:25 +00:00
|
|
|
fetchSubmodules = true;
|
2022-06-03 15:15:52 +00:00
|
|
|
};
|
2023-11-23 05:24:59 +00:00
|
|
|
|
2022-06-03 15:15:52 +00:00
|
|
|
dataZip = fetchurl {
|
|
|
|
url = "https://thelettervsixtim.es/makeandplay/data.zip";
|
|
|
|
name = "data.zip";
|
2024-09-14 21:47:11 +00:00
|
|
|
hash = "sha256-x2eAlZT2Ry2p9WE252ZX44ZA1YQWSkYRIlCsYpPswOo=";
|
2022-06-03 15:15:52 +00:00
|
|
|
meta.license = lib.licenses.unfree;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
makeWrapper
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-11 09:41:25 +00:00
|
|
|
faudio
|
2022-06-03 15:15:52 +00:00
|
|
|
physfs
|
|
|
|
SDL2
|
|
|
|
tinyxml-2
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation IOKit ];
|
|
|
|
|
2023-11-23 05:24:59 +00:00
|
|
|
cmakeDir = "../desktop_version";
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUNDLE_DEPENDENCIES=OFF"
|
|
|
|
] ++ lib.optional makeAndPlay "-DMAKEANDPLAY=ON";
|
2022-06-03 15:15:52 +00:00
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
type = "Application";
|
|
|
|
name = "VVVVVV";
|
|
|
|
desktopName = "VVVVVV";
|
|
|
|
comment = meta.description;
|
2024-08-20 22:56:55 +00:00
|
|
|
exec = "vvvvvv";
|
2022-06-03 15:15:52 +00:00
|
|
|
icon = "VVVVVV";
|
|
|
|
terminal = false;
|
|
|
|
categories = [ "Game" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-08-20 22:56:55 +00:00
|
|
|
install -Dm755 VVVVVV $out/bin/vvvvvv
|
2022-06-03 15:15:52 +00:00
|
|
|
install -Dm644 "$src/desktop_version/icon.ico" "$out/share/pixmaps/VVVVVV.png"
|
2024-01-11 09:41:25 +00:00
|
|
|
cp -r "$src/desktop_version/fonts/" "$out/share/"
|
|
|
|
cp -r "$src/desktop_version/lang/" "$out/share/"
|
2022-06-03 15:15:52 +00:00
|
|
|
|
2024-08-20 22:56:55 +00:00
|
|
|
wrapProgram $out/bin/vvvvvv \
|
2024-01-11 09:41:25 +00:00
|
|
|
--add-flags "-assets ${dataZip}" \
|
|
|
|
--add-flags "-langdir $out/share/lang" \
|
|
|
|
--add-flags "-fontsdir $out/share/fonts"
|
2022-06-03 15:15:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A retro-styled platform game" + lib.optionalString makeAndPlay " (redistributable, without original levels)";
|
|
|
|
longDescription = ''
|
|
|
|
VVVVVV is a platform game all about exploring one simple mechanical
|
|
|
|
idea - what if you reversed gravity instead of jumping?
|
|
|
|
'' + lib.optionalString makeAndPlay ''
|
|
|
|
(Redistributable version, doesn't include the original levels.)
|
|
|
|
'';
|
|
|
|
homepage = "https://thelettervsixtim.es";
|
2024-06-16 20:48:03 +00:00
|
|
|
changelog = "https://github.com/TerryCavanagh/VVVVVV/releases/tag/${src.rev}";
|
2022-06-03 15:15:52 +00:00
|
|
|
license = licenses.unfree;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2022-06-03 15:15:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|