2017-10-17 15:49:54 +02:00
|
|
|
{stdenv, autoreconfHook, buildPackages, fetchurl, flex, readline, ed, texinfo}:
|
2005-10-10 02:55:07 +02:00
|
|
|
|
2010-10-06 00:08:37 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2017-04-23 22:15:31 +02:00
|
|
|
name = "bc-1.07.1";
|
2005-10-10 02:55:07 +02:00
|
|
|
src = fetchurl {
|
2010-10-06 00:08:37 +02:00
|
|
|
url = "mirror://gnu/bc/${name}.tar.gz";
|
2017-04-23 22:15:31 +02:00
|
|
|
sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
|
2005-10-10 02:55:07 +02:00
|
|
|
};
|
|
|
|
|
2010-10-06 00:08:37 +02:00
|
|
|
configureFlags = [ "--with-readline" ];
|
2009-04-08 09:29:42 +02:00
|
|
|
|
2017-10-17 15:49:54 +02:00
|
|
|
# As of 1.07 cross-compilation is quite complicated as the build system wants
|
|
|
|
# to build a code generator, bc/fbc, on the build machine.
|
|
|
|
patches = [ ./cross-bc.patch ];
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
# Tools
|
|
|
|
autoreconfHook ed flex texinfo
|
|
|
|
# Libraries for build
|
|
|
|
buildPackages.readline buildPackages.ncurses
|
|
|
|
];
|
|
|
|
buildInputs = [ readline ];
|
2010-09-27 13:19:31 +02:00
|
|
|
|
2017-10-17 15:49:54 +02:00
|
|
|
doCheck = true; # not cross
|
|
|
|
|
|
|
|
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
|
|
|
# compatability. This will be replaced with something clearer in a future
|
|
|
|
# masss-rebuild.
|
|
|
|
crossConfig = true;
|
2010-10-06 00:08:37 +02:00
|
|
|
|
2010-09-27 13:19:31 +02:00
|
|
|
meta = {
|
|
|
|
description = "GNU software calculator";
|
|
|
|
homepage = http://www.gnu.org/software/bc/;
|
2010-10-06 00:08:37 +02:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2010-09-27 13:19:31 +02:00
|
|
|
};
|
2005-10-10 02:55:07 +02:00
|
|
|
}
|