From 686147d0f69895d8688eadcf8aecd9d19a2c5b1e Mon Sep 17 00:00:00 2001 From: LluĂ­s Batlle i Rossell Date: Wed, 8 Apr 2009 07:29:42 +0000 Subject: Making bc use readline. I prefer bc with readline. svn path=/nixpkgs/trunk/; revision=14919 --- pkgs/tools/misc/bc/default.nix | 8 ++++++-- pkgs/tools/misc/bc/readlinefix.patch | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/misc/bc/readlinefix.patch (limited to 'pkgs/tools/misc/bc') diff --git a/pkgs/tools/misc/bc/default.nix b/pkgs/tools/misc/bc/default.nix index 48de3879d39..da0ff24700c 100644 --- a/pkgs/tools/misc/bc/default.nix +++ b/pkgs/tools/misc/bc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, flex}: +{stdenv, fetchurl, flex, readline}: stdenv.mkDerivation { name = "bc-1.0.6"; @@ -7,5 +7,9 @@ stdenv.mkDerivation { md5 = "d44b5dddebd8a7a7309aea6c36fda117"; }; - buildInputs = [flex]; + patches = [ ./readlinefix.patch ]; + + configureFlags = "--with-readline"; + + buildInputs = [flex readline]; } diff --git a/pkgs/tools/misc/bc/readlinefix.patch b/pkgs/tools/misc/bc/readlinefix.patch new file mode 100644 index 00000000000..74a66e90615 --- /dev/null +++ b/pkgs/tools/misc/bc/readlinefix.patch @@ -0,0 +1,11 @@ +diff -Naur bc-1.06.orig/bc/scan.l bc-1.06/bc/scan.l +--- bc-1.06.orig/bc/scan.l 2000-09-13 13:25:47.000000000 -0500 ++++ bc-1.06/bc/scan.l 2002-07-09 14:36:34.000000000 -0500 +@@ -143,7 +143,6 @@ + + /* Definitions for readline access. */ + extern FILE *rl_instream; +-_PROTOTYPE(char *readline, (char *)); + + /* rl_input puts upto MAX characters into BUF with the number put in + BUF placed in *RESULT. If the yy input file is the same as -- cgit 1.4.1