From afa4138a606d729484e4a249d40237f98a3d185b Mon Sep 17 00:00:00 2001 From: Ram Kromberg Date: Thu, 25 Aug 2016 08:45:10 +0300 Subject: [PATCH] libagar: init at 1.5 --- .../development/libraries/libagar/default.nix | 42 +++++++++++++++++++ .../libraries/libagar/libagar_test.nix | 27 ++++++++++++ pkgs/development/libraries/libagar/srcs.nix | 10 +++++ pkgs/top-level/all-packages.nix | 3 ++ 4 files changed, 82 insertions(+) create mode 100644 pkgs/development/libraries/libagar/default.nix create mode 100644 pkgs/development/libraries/libagar/libagar_test.nix create mode 100644 pkgs/development/libraries/libagar/srcs.nix diff --git a/pkgs/development/libraries/libagar/default.nix b/pkgs/development/libraries/libagar/default.nix new file mode 100644 index 000000000000..1c9e8eca0d57 --- /dev/null +++ b/pkgs/development/libraries/libagar/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, pkgconfig, libtool, perl, bsdbuild, gettext, mandoc +, libpng, libjpeg, xlibsWrapper, libXinerama, freetype, SDL, mesa +, libsndfile, portaudio, mysql, fontconfig +}: + +let srcs = import ./srcs.nix { inherit fetchurl; }; in +stdenv.mkDerivation rec { + name = "libagar-${version}"; + 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=${mesa}" + "--with-mysql=yes" + "--with-manpages=yes" + ]; + + outputs = [ "out" "devdoc" ]; + + nativeBuildInputs = [ pkgconfig libtool gettext ]; + buildInputs = [ + bsdbuild perl xlibsWrapper libXinerama SDL mesa mysql.client 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/pkgs/development/libraries/libagar/libagar_test.nix b/pkgs/development/libraries/libagar/libagar_test.nix new file mode 100644 index 000000000000..dea102774d09 --- /dev/null +++ b/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 rec { + name = "libagar-test-${version}"; + 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/pkgs/development/libraries/libagar/srcs.nix b/pkgs/development/libraries/libagar/srcs.nix new file mode 100644 index 000000000000..53c6a5b89dad --- /dev/null +++ b/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"; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7287d9ca20f0..7be0ffc89ac6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7904,6 +7904,9 @@ in libaccounts-glib = callPackage ../development/libraries/libaccounts-glib { }; + libagar = callPackage ../development/libraries/libagar { }; + libagar_test = callPackage ../development/libraries/libagar/libagar_test.nix { }; + libao = callPackage ../development/libraries/libao { usePulseAudio = config.pulseaudio or true; inherit (darwin.apple_sdk.frameworks) CoreAudio CoreServices AudioUnit;