1{ lib, stdenv, fetchurl, pkg-config, libtool, perl, bsdbuild, gettext, mandoc
2, libpng, libjpeg, libXinerama, freetype, SDL, libGLU, libGL
3, libsndfile, portaudio, libmysqlclient, fontconfig
4}:
5
6stdenv.mkDerivation (finalAttrs: {
7 pname = "libagar";
8 version = "1.5.0";
9
10 src = fetchurl {
11 url = "http://stable.hypertriton.com/agar/agar-${finalAttrs.version}.tar.gz";
12 sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42";
13 };
14
15 preConfigure = ''
16 substituteInPlace configure.in \
17 --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
18 cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
19 '';
20
21 configureFlags = [
22 "--with-libtool=${libtool}/bin/libtool"
23 "--enable-nls=yes"
24 "--with-gettext=${gettext}"
25 "--with-jpeg=${libjpeg.dev}"
26 "--with-gl=${libGL}"
27 "--with-mysql=${libmysqlclient}"
28 "--with-manpages=yes"
29 ];
30
31 outputs = [ "out" "devdoc" ];
32
33 nativeBuildInputs = [ pkg-config libtool gettext ];
34
35 buildInputs = [
36 bsdbuild perl libXinerama SDL libGL libmysqlclient mandoc
37 freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
38 ];
39
40 meta = with lib; {
41 description = "Cross-platform GUI toolkit";
42 homepage = "http://libagar.org/index.html";
43 license = with licenses; bsd3;
44 maintainers = with maintainers; [ ramkromberg ];
45 platforms = with platforms; linux;
46 };
47})