14 stdenv.mkDerivation rec {
19 url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
20 sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3";
23 outputs = [ "out" "dev" "info" ];
24 setOutputFlags = false; # $dev gets into the library otherwise
26 # GCC 4.6 raises a number of set-but-unused warnings.
28 "--disable-error-on-warning"
30 # Guile needs patching to preset results for the configure tests about
31 # pthreads, which work only in native builds.
32 ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
36 buildPackages.stdenv.cc
38 ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
39 pkgsBuildBuild.guile_1_8;
48 propagatedBuildInputs = [
51 # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
52 # flags for them without corresponding '-L' flags. Adding them here will add
53 # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
59 # Fix doc snarfing with GCC 4.5.
66 sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
70 wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
72 # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
73 # why `--with-libunistring-prefix' and similar options coming from
74 # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
76 sed -i "$out/lib/pkgconfig/guile"-*.pc \
77 -e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g"
81 # ERROR: file: "libtest-asmobs", message: "file not found"
83 # <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=a0aa1e5b69d6ef0311aeea8e4b9a94eae18a1aaf>.
85 doInstallCheck = doCheck;
87 setupHook = ./setup-hook-1.8.sh;
90 effectiveVersion = lib.versions.majorMinor version;
91 siteCcacheDir = "lib/guile/site-ccache";
92 siteDir = "share/guile/site";
96 homepage = "https://www.gnu.org/software/guile/";
97 description = "Embeddable Scheme implementation";
99 GNU Guile is an implementation of the Scheme programming language, with
100 support for many SRFIs, packaged for use in a wide variety of
101 environments. In addition to implementing the R5RS Scheme standard and a
102 large subset of R6RS, Guile includes a module system, full access to POSIX
103 system calls, networking support, multiple threads, dynamic linking, a
104 foreign function call interface, and powerful string processing.
106 license = licenses.lgpl3Plus;
107 maintainers = with maintainers; [ ludo ];
108 platforms = platforms.all;