1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 02:46:28 +00:00
nixpkgs/pkgs/tools/misc/bc/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2018-08-16 20:24:42 +01:00
{ stdenv, autoreconfHook, buildPackages
, fetchurl, flex, readline, ed, texinfo
}:
stdenv.mkDerivation rec {
2017-04-23 21:15:31 +01:00
name = "bc-1.07.1";
src = fetchurl {
url = "mirror://gnu/bc/${name}.tar.gz";
2017-04-23 21:15:31 +01:00
sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
};
configureFlags = [ "--with-readline" ];
2017-10-17 14:49:54 +01: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 flex ];
2017-10-17 14:49:54 +01: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.
strictDeps = true;
meta = {
description = "GNU software calculator";
homepage = https://www.gnu.org/software/bc/;
2018-08-16 20:24:42 +01:00
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.all;
};
}