2021-01-15 01:19:50 -08:00
|
|
|
{ lib, stdenv, autoreconfHook, buildPackages
|
2018-08-16 12:24:42 -07:00
|
|
|
, fetchurl, flex, readline, ed, texinfo
|
|
|
|
}:
|
2005-10-09 17:55:07 -07:00
|
|
|
|
2010-10-05 15:08:37 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-11 20:07:47 -08:00
|
|
|
pname = "bc";
|
|
|
|
version = "1.07.1";
|
2005-10-09 17:55:07 -07:00
|
|
|
src = fetchurl {
|
2021-02-11 20:07:47 -08:00
|
|
|
url = "mirror://gnu/bc/${pname}-${version}.tar.gz";
|
2017-04-23 13:15:31 -07:00
|
|
|
sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
|
2005-10-09 17:55:07 -07:00
|
|
|
};
|
|
|
|
|
2010-10-05 15:08:37 -07:00
|
|
|
configureFlags = [ "--with-readline" ];
|
2009-04-08 00:29:42 -07:00
|
|
|
|
2017-10-17 06:49:54 -07: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
|
|
|
|
];
|
2018-11-19 14:05:33 -08:00
|
|
|
buildInputs = [ readline flex ];
|
2010-09-27 04:19:31 -07:00
|
|
|
|
2017-10-17 06:49:54 -07: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.
|
2018-05-13 08:31:24 -07:00
|
|
|
strictDeps = true;
|
2010-10-05 15:08:37 -07:00
|
|
|
|
2021-02-11 20:07:47 -08:00
|
|
|
meta = with lib; {
|
2010-09-27 04:19:31 -07:00
|
|
|
description = "GNU software calculator";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.gnu.org/software/bc/";
|
2021-02-11 20:07:47 -08:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.all;
|
2010-09-27 04:19:31 -07:00
|
|
|
};
|
2005-10-09 17:55:07 -07:00
|
|
|
}
|