bc: fixes for cross-compilation

This commit is contained in:
Ben Gamari
2018-01-22 16:21:10 -05:00
committed by John Ericson
parent ec0c4802ae
commit 8b21391127
2 changed files with 187 additions and 3 deletions
+18 -3
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl, flex, readline, ed, texinfo}:
{stdenv, autoreconfHook, buildPackages, fetchurl, flex, readline, ed, texinfo}:
stdenv.mkDerivation rec {
name = "bc-1.07.1";
@@ -9,9 +9,24 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-readline" ];
buildInputs = [flex readline ed texinfo];
# 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 ];
doCheck = true;
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;
meta = {
description = "GNU software calculator";