1 { lib, stdenv, autoreconfHook, buildPackages
2 , fetchurl, flex, readline, ed, texinfo
5 stdenv.mkDerivation rec {
9 url = "mirror://gnu/bc/${pname}-${version}.tar.gz";
10 sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
13 configureFlags = [ "--with-readline" ];
15 # As of 1.07 cross-compilation is quite complicated as the build system wants
16 # to build a code generator, bc/fbc, on the build machine.
17 patches = [ ./cross-bc.patch ];
18 depsBuildBuild = [ buildPackages.stdenv.cc ];
21 autoreconfHook ed flex texinfo
23 buildPackages.readline buildPackages.ncurses
25 buildInputs = [ readline flex ];
27 doCheck = true; # not cross
29 # Hack to make sure we never to the relaxation `$PATH` and hooks support for
30 # compatability. This will be replaced with something clearer in a future
35 description = "GNU software calculator";
36 homepage = "https://www.gnu.org/software/bc/";
37 license = licenses.gpl3Plus;
38 platforms = platforms.all;