nixpkgs/pkgs/tools/misc/bc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-04 10:23:21 +00:00
{
lib,
stdenv,
autoreconfHook,
buildPackages,
fetchurl,
flex,
readline,
ed,
texinfo,
2018-08-16 19:24:42 +00:00
}:
stdenv.mkDerivation rec {
pname = "bc";
version = "1.07.1";
src = fetchurl {
url = "mirror://gnu/bc/${pname}-${version}.tar.gz";
2017-04-23 20:15:31 +00:00
sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
};
configureFlags = [ "--with-readline" ];
2017-10-17 13:49:54 +00: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
2024-07-04 10:23:21 +00:00
autoreconfHook
ed
flex
texinfo
2017-10-17 13:49:54 +00:00
# Libraries for build
2024-07-04 10:23:21 +00:00
buildPackages.readline
buildPackages.ncurses
];
buildInputs = [
readline
flex
2017-10-17 13:49:54 +00:00
];
2017-10-17 13:49:54 +00:00
doCheck = true; # not cross
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
2023-05-20 02:11:55 +00:00
# compatibility. This will be replaced with something clearer in a future
2017-10-17 13:49:54 +00:00
# masss-rebuild.
strictDeps = true;
meta = with lib; {
description = "GNU software calculator";
homepage = "https://www.gnu.org/software/bc/";
license = licenses.gpl3Plus;
platforms = platforms.all;
2024-07-04 10:24:00 +00:00
mainProgram = "bc";
};
}