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