lol

guile 1.8: rename and reformat

+53 -32
+52 -30
pkgs/development/interpreters/guile/1.8.nix
··· 1 - { lib, stdenv, pkgsBuildBuild, buildPackages 2 - , fetchurl, makeWrapper, gawk, pkg-config 3 - , libtool, readline, gmp 4 }: 5 6 stdenv.mkDerivation rec { 7 - name = "guile-1.8.8"; 8 9 src = fetchurl { 10 - url = "mirror://gnu/guile/${name}.tar.gz"; 11 sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"; 12 }; 13 ··· 15 setOutputFlags = false; # $dev gets into the library otherwise 16 17 # GCC 4.6 raises a number of set-but-unused warnings. 18 - configureFlags = [ "--disable-error-on-warning" ] 19 - # Guile needs patching to preset results for the configure tests about 20 - # pthreads, which work only in native builds. 21 - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 22 - "--with-threads=no"; 23 - 24 - depsBuildBuild = [ buildPackages.stdenv.cc ] 25 - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 26 - pkgsBuildBuild.guile_1_8; 27 - nativeBuildInputs = [ makeWrapper gawk pkg-config ]; 28 - buildInputs = [ readline libtool ]; 29 30 propagatedBuildInputs = [ 31 gmp 32 ··· 38 ]; 39 40 patches = [ 41 ./cpp-4.5.patch 42 ./CVE-2016-8605.patch 43 ]; 44 ··· 46 sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c 47 ''; 48 49 - 50 postInstall = '' 51 wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" 52 '' 53 - # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for 54 - # why `--with-libunistring-prefix' and similar options coming from 55 - # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. 56 + '' 57 sed -i "$out/lib/pkgconfig/guile"-*.pc \ 58 -e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g" ··· 65 doCheck = false; 66 doInstallCheck = doCheck; 67 68 - setupHook = ./setup-hook.sh; 69 70 - meta = { 71 description = "Embeddable Scheme implementation"; 72 - homepage = "https://www.gnu.org/software/guile/"; 73 - license = lib.licenses.lgpl2Plus; 74 - maintainers = [ lib.maintainers.ludo ]; 75 - platforms = lib.platforms.unix; 76 - 77 longDescription = '' 78 - GNU Guile is an interpreter for the Scheme programming language, 79 - packaged as a library that can be embedded into programs to make 80 - them extensible. It supports many SRFIs. 81 ''; 82 }; 83 }
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , buildPackages 5 + , gawk 6 + , gmp 7 + , libtool 8 + , makeWrapper 9 + , pkg-config 10 + , pkgsBuildBuild 11 + , readline 12 }: 13 14 stdenv.mkDerivation rec { 15 + pname = "guile"; 16 + version = "1.8.8"; 17 18 src = fetchurl { 19 + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; 20 sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"; 21 }; 22 ··· 24 setOutputFlags = false; # $dev gets into the library otherwise 25 26 # GCC 4.6 raises a number of set-but-unused warnings. 27 + configureFlags = [ 28 + "--disable-error-on-warning" 29 + ] 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) 33 + "--with-threads=no"; 34 35 + depsBuildBuild = [ 36 + buildPackages.stdenv.cc 37 + ] 38 + ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 39 + pkgsBuildBuild.guile_1_8; 40 + nativeBuildInputs = [ 41 + gawk 42 + makeWrapper 43 + pkg-config 44 + ]; 45 + buildInputs = [ 46 + libtool 47 + readline 48 + ]; 49 propagatedBuildInputs = [ 50 gmp 51 ··· 57 ]; 58 59 patches = [ 60 + # Fix doc snarfing with GCC 4.5. 61 ./cpp-4.5.patch 62 + # Self explanatory 63 ./CVE-2016-8605.patch 64 ]; 65 ··· 67 sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c 68 ''; 69 70 postInstall = '' 71 wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" 72 '' 73 + # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for 74 + # why `--with-libunistring-prefix' and similar options coming from 75 + # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. 76 + '' 77 sed -i "$out/lib/pkgconfig/guile"-*.pc \ 78 -e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g" ··· 85 doCheck = false; 86 doInstallCheck = doCheck; 87 88 + setupHook = ./setup-hook-1.8.sh; 89 90 + meta = with lib; { 91 + homepage = "https://www.gnu.org/software/guile/"; 92 description = "Embeddable Scheme implementation"; 93 longDescription = '' 94 + GNU Guile is an implementation of the Scheme programming language, with 95 + support for many SRFIs, packaged for use in a wide variety of 96 + environments. In addition to implementing the R5RS Scheme standard and a 97 + large subset of R6RS, Guile includes a module system, full access to POSIX 98 + system calls, networking support, multiple threads, dynamic linking, a 99 + foreign function call interface, and powerful string processing. 100 ''; 101 + license = licenses.lgpl3Plus; 102 + maintainers = with maintainers; [ ludo ]; 103 + platforms = platforms.all; 104 }; 105 }
+1 -2
pkgs/development/interpreters/guile/setup-hook.sh pkgs/development/interpreters/guile/setup-hook-1.8.sh
··· 1 addGuileLibPath () { 2 - if test -d "$1/share/guile/site" 3 - then 4 export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site" 5 fi 6 }
··· 1 addGuileLibPath () { 2 + if test -d "$1/share/guile/site"; then 3 export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site" 4 fi 5 }