Files
nixpkgs/pkgs/by-name/gl/gltron/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

69 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchurl,
SDL,
libGLU,
libGL,
zlib,
libpng,
libvorbis,
libmikmod,
SDL_sound,
}:
stdenv.mkDerivation rec {
pname = "gltron";
version = "0.70";
src = fetchurl {
url = "mirror://sourceforge/gltron/gltron-${version}-source.tar.gz";
sha256 = "e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0";
};
patches = [
./gentoo-prototypes.patch
# gcc-14 build fix: https://sourceforge.net/p/gltron/patches/7/
(fetchurl {
name = "gcc-14.patch";
url = "https://sourceforge.net/p/gltron/patches/7/attachment/gcc-14.patch";
hash = "sha256-OJAUAM/OQVwxYnIacBkncNxMLn/HDCoysbi+Txe+DC8=";
})
];
postPatch = ''
# Fix https://sourceforge.net/p/gltron/bugs/15
sed -i /__USE_MISC/d lua/src/lib/liolib.c
'';
# The build fails, unless we disable the default -Wall -Werror
configureFlags = [ "--disable-warn" ];
makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
env.SDL_CONFIG = lib.getExe' (lib.getDev SDL) "sdl-config";
buildInputs = [
SDL
libGLU
libGL
zlib
libpng
libvorbis
libmikmod
SDL_sound
];
strictDeps = true;
enableParallelBuilding = true;
meta = {
homepage = "http://www.gltron.org/";
description = "Game based on the movie Tron";
mainProgram = "gltron";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = with lib.platforms; linux;
};
}