Making bc use readline. I prefer bc with readline.

svn path=/nixpkgs/trunk/; revision=14919
This commit is contained in:
Lluís Batlle i Rossell 2009-04-08 07:29:42 +00:00
parent 6f96ae757d
commit 686147d0f6
3 changed files with 18 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, flex}: {stdenv, fetchurl, flex, readline}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "bc-1.0.6"; name = "bc-1.0.6";
@ -7,5 +7,9 @@ stdenv.mkDerivation {
md5 = "d44b5dddebd8a7a7309aea6c36fda117"; md5 = "d44b5dddebd8a7a7309aea6c36fda117";
}; };
buildInputs = [flex]; patches = [ ./readlinefix.patch ];
configureFlags = "--with-readline";
buildInputs = [flex readline];
} }

View File

@ -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

View File

@ -422,7 +422,7 @@ let
}; };
bc = import ../tools/misc/bc { bc = import ../tools/misc/bc {
inherit fetchurl stdenv flex; inherit fetchurl stdenv flex readline;
}; };
bfr = import ../tools/misc/bfr { bfr = import ../tools/misc/bfr {