summary refs log tree commit diff
path: root/pkgs/development/libraries/libagar/default.nix
blob: 48fb0f1153e78d5e13c425ba81ebda8f7870d96f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ stdenv, fetchurl, pkgconfig, libtool, perl, bsdbuild, gettext, mandoc
, libpng, libjpeg, xlibsWrapper, libXinerama, freetype, SDL, libGLU_combined
, libsndfile, portaudio, mysql, fontconfig
}:

let srcs = import ./srcs.nix { inherit fetchurl; }; in
stdenv.mkDerivation {
  pname = "libagar";
  inherit (srcs) version src;

  preConfigure = ''
    substituteInPlace configure.in \
      --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
    cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
  '';

  configureFlags = [
    "--with-libtool=${libtool}/bin/libtool"
    "--enable-nls=yes"
    "--with-gettext=${gettext}"
    "--with-jpeg=${libjpeg.dev}"
    "--with-gl=${libGLU_combined}"
    "--with-mysql=${mysql.connector-c}"
    "--with-manpages=yes"
  ];

  outputs = [ "out" "devdoc" ];

  nativeBuildInputs = [ pkgconfig libtool gettext ];

  buildInputs = [
    bsdbuild perl xlibsWrapper libXinerama SDL libGLU_combined mysql.connector-c mandoc
    freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
  ];

  meta = with stdenv.lib; {
    description = "Cross-platform GUI toolkit";
    homepage = http://libagar.org/index.html;
    license = with licenses; bsd3;
    maintainers = with maintainers; [ ramkromberg ];
    platforms = with platforms; linux;
  };
}