1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/pkgs/tools/misc/bc/default.nix
Karn Kallio bebcd96c1d Apply patch taken from http://www.linuxfromscratch.org/blfs/view/svn/general/bc.html
to fix segfault when using -l option.

svn path=/nixpkgs/trunk/; revision=25432
2011-01-06 03:11:25 +00:00

28 lines
584 B
Nix

{stdenv, fetchurl, flex, readline}:
stdenv.mkDerivation rec {
name = "bc-1.06";
src = fetchurl {
url = "mirror://gnu/bc/${name}.tar.gz";
sha256 = "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf";
};
patches = [ ./readlinefix.patch ];
preConfigure = ''
sed -i 's/program.*save/static &/' bc/load.c
'';
configureFlags = [ "--with-readline" ];
buildInputs = [flex readline];
doCheck = true;
meta = {
description = "GNU software calculator";
homepage = http://www.gnu.org/software/bc/;
platforms = stdenv.lib.platforms.all;
};
}