@@ -0,0 +1,40 @@
1+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config
2+, libglvnd, SDL, SDL_image, SDL_mixer, xorg
3+}:
4+
5+stdenv.mkDerivation rec {
6+ pname = "pinball";
7+ version = "0.3.20201218";
8+
9+ src = fetchurl {
10+ url = "mirror://sourceforge/pinball/pinball-${version}.tar.gz";
11+ sha256 = "0vacypp3ksq1hs6hxpypx7nrfkprbl4ksfywcncckwrh4qcir631";
12+ };
13+
14+ postPatch = ''
15+ sed -i 's/^AUTOMAKE_OPTIONS = gnu$/AUTOMAKE_OPTIONS = foreign/' Makefile.am
16+ '';
17+
18+ nativeBuildInputs = [ autoreconfHook pkg-config ];
19+ buildInputs = [ libglvnd SDL SDL_image SDL_mixer xorg.libSM ];
20+ strictDeps = true;
21+
22+ configureFlags = [
23+ "--with-sdl-prefix=${lib.getDev SDL}"
24+ ];
25+
26+ NIX_CFLAGS_COMPILE = [
27+ "-I${lib.getDev SDL_image}/include/SDL"
28+ "-I${lib.getDev SDL_mixer}/include/SDL"
29+ ];
30+
31+ enableParallelBuilding = true;
32+
33+ meta = with lib; {
34+ homepage = "https://purl.org/rzr/pinball";
35+ description = "Emilia Pinball simulator";
36+ license = licenses.gpl2Only;
37+ maintainers = with maintainers; [ qyliss ];
38+ platforms = platforms.linux;
39+ };
40+}