diff --git a/pkgs/development/libraries/buddy/default.nix b/pkgs/development/libraries/buddy/default.nix index 16db4290ec0d..0b0a937bc182 100644 --- a/pkgs/development/libraries/buddy/default.nix +++ b/pkgs/development/libraries/buddy/default.nix @@ -1,20 +1,21 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, bison }: stdenv.mkDerivation rec { name = "buddy-2.4"; - + + src = fetchurl { + url = "mirror://sourceforge/buddy/${name}.tar.gz"; + sha256 = "0dl86l9xkl33wnkz684xa9axhcxx2zzi4q5lii0axnb9lsk81pyk"; + }; + + buildInputs = [ bison ]; + patches = [ ./gcc-4.3.3-fixes.patch ]; + configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3"; + doCheck = true; + meta = { homepage = "http://sourceforge.net/projects/buddy/"; description = "binary decision diagram package"; license = "as-is"; }; - - src = fetchurl { - url = "mirror://sourceforge/buddy/${name}.tar.gz"; - sha256 = "0dl86l9xkl33wnkz684xa9axhcxx2zzi4q5lii0axnb9lsk81pyk"; - }; - - configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3"; - - doCheck = true; } diff --git a/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch b/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch new file mode 100644 index 000000000000..2e7efd1c4666 --- /dev/null +++ b/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch @@ -0,0 +1,22 @@ +diff -uwr buddy-2.4.orig/examples/bddcalc/parser.yxx buddy-2.4/examples/bddcalc/parser.yxx +--- buddy-2.4.orig/examples/bddcalc/parser.yxx 2009-07-02 17:12:48.000000000 +0200 ++++ buddy-2.4/examples/bddcalc/parser.yxx 2009-07-02 17:18:36.000000000 +0200 +@@ -7,6 +7,7 @@ + + %{ + #include ++#include + #include + #include + #include +diff -uwr buddy-2.4.orig/src/bddtest.cxx buddy-2.4/src/bddtest.cxx +--- buddy-2.4.orig/src/bddtest.cxx 2009-07-02 17:12:48.000000000 +0200 ++++ buddy-2.4/src/bddtest.cxx 2009-07-02 17:14:05.000000000 +0200 +@@ -28,6 +28,7 @@ + ========================================================================*/ + + #include ++#include + #include "bdd.h" + #include "bvec.h" + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 802e6f9eea8b..eb0da3a424c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2895,7 +2895,7 @@ let }; buddy = import ../development/libraries/buddy { - inherit fetchurl stdenv; + inherit fetchurl stdenv bison; }; cairo = import ../development/libraries/cairo {