Files
nixpkgs/pkgs/by-name/to/toppler/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

92 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
nix-update-script,
writableTmpDirAsHomeHook,
buildPackages,
pkg-config,
gettext,
povray,
imagemagick,
gimp2,
sdl2-compat,
SDL2_mixer,
SDL2_image,
libpng,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "toppler";
version = "1.3";
src = fetchFromGitLab {
owner = "roever";
repo = "toppler";
rev = "v${finalAttrs.version}";
hash = "sha256-ecEaELu52Nmov/BD9VzcUw6wyWeHJcsKQkEzTnaW330=";
};
strictDeps = true;
enableParallelBuilding = true;
depsBuildBuild = [
buildPackages.stdenv.cc
pkg-config
sdl2-compat
SDL2_image
libpng
zlib
];
nativeBuildInputs = [
pkg-config
gettext
povray
imagemagick
gimp2
# GIMP needs a writable home
writableTmpDirAsHomeHook
];
buildInputs = [
sdl2-compat
SDL2_mixer
zlib
];
patches = [
# Based on https://gitlab.com/roever/toppler/-/merge_requests/3
./gcc14.patch
];
makeFlags = [
"CXX_NATIVE=$(CXX_FOR_BUILD)"
"PKG_CONFIG_NATIVE=$(PKG_CONFIG_FOR_BUILD)"
"PREFIX=${placeholder "out"}"
];
preBuild = ''
# The `$` is escaped in `makeFlags` so using it for these parameters results in infinite recursion
makeFlagsArray+=(CXX=$CXX PKG_CONFIG=$PKG_CONFIG);
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Jump and run game, reimplementation of Tower Toppler/Nebulus";
homepage = "https://gitlab.com/roever/toppler";
license = with lib.licenses; [
gpl2Plus
# Makefile
gpl3Plus
];
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
mainProgram = "toppler";
};
})