nixpkgs/pkgs/development/interpreters/guile/default.nix
Lluís Batlle i Rossell a263cb814e Fixed some details on cross compilation. Among others:
- Stating better the guile dependencies (native/host) for guile to build
- Fixing cross-linking, through --rpath-link (ld(1) explains well about it
- Made gcc call the linker and the assembler through the gcc wrapper instead of
  directly. I thought this was the source of missing -rpath's, but the source
  of the problem ended up being the lack of --rpath-link. But I think the
  native gcc calls the wrapped ld and as, so let's do the same cross
  compiling.
- Removed the binutilsCross from the glibc expressions. Now they are built
  using the gcc-cross-wrapper, and they were built with the direct gcc and
  binutils before this change.
- I think patchelf and strip don't break the cross-compiled binaries, so I
  reallow them on cross compilation.
- I disable the checkPhase on cross compilation. This made gmp and libtool
  fail when cross compiled, iirc.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18498
2009-11-21 02:42:52 +00:00

43 lines
1.1 KiB
Nix

{ fetchurl, stdenv, libtool, readline, gmp
, gawk, makeWrapper }:
stdenv.mkDerivation rec {
name = "guile-1.8.7";
src = fetchurl {
url = "mirror://gnu/guile/" + name + ".tar.gz";
sha256 = "1czhcrn6l63xhsw3fjmv88djflqxbdpxjhgmwwvscm8rv4wn7vmz";
};
buildNativeInputs = [ makeWrapper ];
propagatedBuildInputs = [ libtool gmp ];
propagatedBuildNativeInputs = [readline gawk];
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
'';
NIX_DEBUG=1;
preBuild = ''
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
'';
doCheck = true;
setupHook = ./setup-hook.sh;
meta = {
description = "GNU Guile, an embeddable Scheme interpreter";
longDescription = ''
GNU Guile is an interpreter for the Scheme programming language,
packaged as a library that can be embedded into programs to make
them extensible. It supports many SRFIs.
'';
homepage = http://www.gnu.org/software/guile/;
license = "LGPLv2+";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
}