Commit | Line | Data |
---|---|---|
e3ce5d70 LC |
1 | ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- |
2 | ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | |
3 | ;;; | |
4 | ;;; This file is part of Guix. | |
5 | ;;; | |
6 | ;;; Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (distro base) | |
20 | #:use-module (guix packages) | |
21 | #:use-module (guix http) | |
22 | #:use-module (guix build-system gnu) | |
23 | #:use-module (guix utils)) | |
24 | ||
25 | ;;; Commentary: | |
26 | ;;; | |
27 | ;;; A Guix-based distribution. | |
28 | ;;; | |
29 | ;;; Code: | |
30 | ||
64fddd74 LC |
31 | (define-public libsigsegv |
32 | (package | |
33 | (name "libsigsegv") | |
34 | (version "2.10") | |
90c68be8 | 35 | (source (origin |
64fddd74 | 36 | (method http-fetch) |
90c68be8 LC |
37 | (uri (string-append |
38 | "http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-" | |
39 | version ".tar.gz")) | |
64fddd74 | 40 | (sha256 |
e4c245f8 | 41 | (base32 "16hrs8k3nmc7a8jam5j1fpspd6sdpkamskvsdpcw6m29vnis8q44")))) |
64fddd74 | 42 | (build-system gnu-build-system) |
888f72e9 | 43 | (outputs '("out" "lib")) ; separate libdir from the rest |
64fddd74 LC |
44 | (home-page "http://www.gnu.org/software/libsigsegv/") |
45 | (description "GNU libsigsegv, a library to handle page faults in user mode") | |
46 | (long-description | |
47 | "GNU libsigsegv is a library for handling page faults in user mode. A page | |
48 | fault occurs when a program tries to access to a region of memory that is | |
49 | currently not available. Catching and handling a page fault is a useful | |
50 | technique for implementing pageable virtual memory, memory-mapped access to | |
51 | persistent databases, generational garbage collectors, stack overflow | |
52 | handlers, distributed shared memory, and more.") | |
53 | (license "GPLv2+"))) | |
54 | ||
55 | (define-public gawk | |
56 | (package | |
57 | (name "gawk") | |
58 | (version "4.0.0") | |
90c68be8 | 59 | (source (origin |
64fddd74 | 60 | (method http-fetch) |
90c68be8 LC |
61 | (uri (string-append "http://ftp.gnu.org/gnu/gawk/gawk-" version |
62 | ".tar.bz2")) | |
64fddd74 | 63 | (sha256 |
e4c245f8 | 64 | (base32 "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0")))) |
64fddd74 | 65 | (build-system gnu-build-system) |
03671375 LC |
66 | (arguments (case-lambda |
67 | ((system) | |
68 | (if (string=? system "i686-cygwin") | |
69 | '(#:tests? #f) ; work around test failure on Cygwin | |
70 | '())) | |
71 | ((system cross-system) | |
72 | '()))) | |
888f72e9 LC |
73 | (inputs `(("libsigsegv" ,libsigsegv) ; headers |
74 | ("libsigsegv/lib" ,libsigsegv "lib"))) ; library | |
64fddd74 LC |
75 | (home-page "http://www.gnu.org/software/gawk/") |
76 | (description "GNU implementation of the Awk programming language") | |
77 | (long-description | |
78 | "Many computer users need to manipulate text files: extract and then | |
79 | operate on data from parts of certain lines while discarding the rest, make | |
80 | changes in various text files wherever certain patterns appear, and so on. | |
81 | To write a program to do these things in a language such as C or Pascal is a | |
82 | time-consuming inconvenience that may take many lines of code. The job is | |
83 | easy with awk, especially the GNU implementation: Gawk. | |
84 | ||
85 | The awk utility interprets a special-purpose programming language that makes | |
86 | it possible to handle many data-reformatting jobs with just a few lines of | |
87 | code.") | |
88 | (license "GPLv3+"))) | |
89 | ||
e3ce5d70 LC |
90 | (define-public hello |
91 | (package | |
92 | (name "hello") | |
93 | (version "2.8") | |
90c68be8 | 94 | (source (origin |
e3ce5d70 | 95 | (method http-fetch) |
90c68be8 LC |
96 | (uri (string-append "http://ftp.gnu.org/gnu/hello/hello-" version |
97 | ".tar.gz")) | |
e3ce5d70 | 98 | (sha256 |
e4c245f8 | 99 | (base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")))) |
e3ce5d70 LC |
100 | (build-system gnu-build-system) |
101 | (arguments '(#:configure-flags | |
102 | `("--disable-dependency-tracking" | |
103 | ,(string-append "--with-gawk=" ; for illustration purposes | |
104 | (assoc-ref %build-inputs "gawk"))))) | |
64fddd74 | 105 | (inputs `(("gawk" ,gawk))) |
e3ce5d70 LC |
106 | (description "GNU Hello") |
107 | (long-description "Yeah...") | |
45753b65 | 108 | (home-page "http://www.gnu.org/software/hello/") |
e3ce5d70 | 109 | (license "GPLv3+"))) |
d7672884 LC |
110 | |
111 | (define-public guile-1.8 | |
112 | (package | |
113 | (name "guile") | |
114 | (version "1.8.8") | |
115 | (source (origin | |
116 | (method http-fetch) | |
117 | (uri (string-append "http://ftp.gnu.org/gnu/guile/guile-" version | |
118 | ".tar.gz")) | |
119 | (sha256 | |
120 | (base32 | |
121 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")))) | |
122 | (build-system gnu-build-system) | |
10c87717 | 123 | (arguments '(#:configure-flags '("--disable-error-on-warning") |
d7672884 LC |
124 | #:patches (list (assoc-ref %build-inputs "patch/snarf")) |
125 | ||
126 | ;; Insert a phase before `configure' to patch things up. | |
127 | #:phases (alist-cons-before | |
128 | 'configure | |
129 | 'patch-loader-search-path | |
130 | (lambda* (#:key outputs #:allow-other-keys) | |
131 | ;; Add a call to `lt_dladdsearchdir' so that | |
132 | ;; `libguile-readline.so' & co. are in the | |
133 | ;; loader's search path. | |
10c87717 LC |
134 | (substitute* "libguile/dynl.c" |
135 | ("lt_dlinit.*$" match) | |
136 | (format #f | |
137 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
138 | match | |
139 | (assoc-ref outputs "out")))) | |
d7672884 LC |
140 | %standard-phases))) |
141 | (inputs `(("patch/snarf" | |
142 | ,(search-path %load-path "distro/guile-1.8-cpp-4.5.patch")) | |
143 | ("gawk" ,gawk) | |
144 | ("readline" ,(nixpkgs-derivation "readline")) | |
145 | ("gmp" ,(nixpkgs-derivation "gmp")) | |
146 | ("libtool" ,(nixpkgs-derivation "libtool")))) | |
147 | ||
148 | ;; When cross-compiling, a native version of Guile itself is needed. | |
149 | (self-native-input? #t) | |
150 | ||
151 | (description "GNU Guile 1.8, an embeddable Scheme interpreter") | |
152 | (long-description | |
153 | "GNU Guile 1.8 is an interpreter for the Scheme programming language, | |
154 | packaged as a library that can be embedded into programs to make them | |
155 | extensible. It supports many SRFIs.") | |
156 | (home-page "http://www.gnu.org/software/guile/") | |
157 | (license "LGPLv2+"))) | |
158 | ||
159 | ;;; Local Variables: | |
160 | ;;; eval: (put 'lambda* 'scheme-indent-function 1) | |
161 | ;;; End: |