diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-04-08 07:29:42 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-04-08 07:29:42 +0000 |
commit | 686147d0f69895d8688eadcf8aecd9d19a2c5b1e (patch) | |
tree | 815c283b77d2b0622e3761385141158b0faad3b3 /pkgs/tools/misc/bc | |
parent | 6f96ae757de88295289fe7724ef1c505560b8125 (diff) |
Making bc use readline. I prefer bc with readline.
svn path=/nixpkgs/trunk/; revision=14919
Diffstat (limited to 'pkgs/tools/misc/bc')
-rw-r--r-- | pkgs/tools/misc/bc/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/misc/bc/readlinefix.patch | 11 |
2 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/tools/misc/bc/default.nix b/pkgs/tools/misc/bc/default.nix index 48de3879d3930..da0ff24700c62 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 0000000000000..74a66e90615dd --- /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 |