2023-03-17 14:19:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-03-05 09:51:44 +00:00
|
|
|
, cmake
|
2023-03-17 14:19:00 +00:00
|
|
|
, pkg-config
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2023-03-17 14:19:00 +00:00
|
|
|
|
|
|
|
, curl
|
|
|
|
, freetype
|
|
|
|
, glew
|
2024-03-05 09:51:44 +00:00
|
|
|
, gtk3
|
2023-03-17 14:19:00 +00:00
|
|
|
, libGL
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, SDL2
|
|
|
|
, SDL2_gfx
|
|
|
|
, SDL2_image
|
|
|
|
, SDL2_mixer
|
|
|
|
, SDL2_ttf
|
|
|
|
}:
|
|
|
|
|
2024-03-05 09:51:44 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-03-17 14:19:00 +00:00
|
|
|
pname = "principia";
|
2024-07-13 08:11:52 +00:00
|
|
|
version = "2024.07.12";
|
2023-03-17 14:19:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bithack";
|
|
|
|
repo = "principia";
|
2024-03-05 09:51:44 +00:00
|
|
|
rev = finalAttrs.version;
|
2024-07-13 08:11:52 +00:00
|
|
|
hash = "sha256-JZXarRXScn7/0uve3Ul9dxMz0TE3N8E1VR1nasl051Q=";
|
2023-03-17 14:19:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-03-05 09:51:44 +00:00
|
|
|
cmake
|
2023-03-17 14:19:00 +00:00
|
|
|
pkg-config
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2023-03-17 14:19:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
freetype
|
|
|
|
glew
|
2024-03-05 09:51:44 +00:00
|
|
|
gtk3
|
2023-03-17 14:19:00 +00:00
|
|
|
libGL
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
SDL2
|
|
|
|
SDL2_gfx
|
|
|
|
SDL2_image
|
|
|
|
SDL2_mixer
|
|
|
|
SDL2_ttf
|
|
|
|
];
|
|
|
|
|
2024-03-05 09:51:44 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# Remove when https://github.com/NixOS/nixpkgs/issues/144170 is fixed
|
|
|
|
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
|
|
|
|
];
|
2023-03-17 14:19:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-03-05 09:51:44 +00:00
|
|
|
changelog = "https://principia-web.se/wiki/Changelog#${lib.replaceStrings ["."] ["-"] finalAttrs.version}";
|
2023-03-17 14:19:00 +00:00
|
|
|
description = "Physics-based sandbox game";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "principia";
|
2023-03-17 14:19:00 +00:00
|
|
|
homepage = "https://principia-web.se/";
|
|
|
|
downloadPage = "https://principia-web.se/download";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.fgaz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2024-03-05 09:51:44 +00:00
|
|
|
})
|