1{ stdenv, fetchurl, pkgconfig, libtool, perl, bsdbuild, gettext, mandoc
2, libpng, libjpeg, xlibsWrapper, libXinerama, freetype, SDL, libGLU_combined
3, libsndfile, portaudio, mysql, fontconfig
4}:
5
6let srcs = import ./srcs.nix { inherit fetchurl; }; in
7stdenv.mkDerivation rec {
8 name = "libagar-${version}";
9 inherit (srcs) version src;
10
11 preConfigure = ''
12 substituteInPlace configure.in \
13 --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
14 cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
15 '';
16
17 configureFlags = [
18 "--with-libtool=${libtool}/bin/libtool"
19 "--enable-nls=yes"
20 "--with-gettext=${gettext}"
21 "--with-jpeg=${libjpeg.dev}"
22 "--with-gl=${libGLU_combined}"
23 "--with-mysql=${mysql.connector-c}"
24 "--with-manpages=yes"
25 ];
26
27 outputs = [ "out" "devdoc" ];
28
29 nativeBuildInputs = [ pkgconfig libtool gettext ];
30
31 buildInputs = [
32 bsdbuild perl xlibsWrapper libXinerama SDL libGLU_combined mysql.connector-c mandoc
33 freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
34 ];
35
36 meta = with stdenv.lib; {
37 description = "Cross-platform GUI toolkit";
38 homepage = http://libagar.org/index.html;
39 license = with licenses; bsd3;
40 maintainers = with maintainers; [ ramkromberg ];
41 platforms = with platforms; linux;
42 };
43}