about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libagar
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libagar')
-rw-r--r--nixpkgs/pkgs/development/libraries/libagar/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libagar/srcs.nix10
3 files changed, 80 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libagar/default.nix b/nixpkgs/pkgs/development/libraries/libagar/default.nix
new file mode 100644
index 000000000000..c0a43efc27ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libagar/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, pkgconfig, libtool, perl, bsdbuild, gettext, mandoc
+, libpng, libjpeg, xlibsWrapper, libXinerama, freetype, SDL, libGLU, libGL
+, libsndfile, portaudio, libmysqlclient, 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=${libGL}"
+    "--with-mysql=${libmysqlclient}"
+    "--with-manpages=yes"
+  ];
+
+  outputs = [ "out" "devdoc" ];
+
+  nativeBuildInputs = [ pkgconfig libtool gettext ];
+
+  buildInputs = [
+    bsdbuild perl xlibsWrapper libXinerama SDL libGL libmysqlclient 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;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix b/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix
new file mode 100644
index 000000000000..4295971d5a0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, bsdbuild, libagar, perl, libjpeg, libpng, openssl }:
+
+let srcs = import ./srcs.nix { inherit fetchurl; }; in
+stdenv.mkDerivation {
+  pname = "libagar-test";
+  inherit (srcs) version src;
+
+  sourceRoot = "agar-1.5.0/tests";
+
+  preConfigure = ''
+    substituteInPlace configure.in \
+      --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
+    cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
+  '';
+
+  configureFlags = [ "--with-agar=${libagar}" ];
+
+  buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ];
+
+  meta = with stdenv.lib; {
+    description = "Tests for libagar";
+    homepage = http://libagar.org/index.html;
+    license = with licenses; bsd3;
+    maintainers = with maintainers; [ ramkromberg ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libagar/srcs.nix b/nixpkgs/pkgs/development/libraries/libagar/srcs.nix
new file mode 100644
index 000000000000..53c6a5b89dad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libagar/srcs.nix
@@ -0,0 +1,10 @@
+{ fetchurl }:
+rec {
+  version = "1.5.0";
+
+  src = fetchurl {
+    url = "http://stable.hypertriton.com/agar/agar-${version}.tar.gz";
+    sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42";
+  };
+
+}