Commit | Line | Data |
---|---|---|
feadf100 JD |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> | |
ea5d238d | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
2e3d5fdf | 4 | ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> |
feadf100 JD |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages cook) | |
22 | #:use-module (guix packages) | |
23 | #:use-module (guix licenses) | |
24 | #:use-module (guix download) | |
25 | #:use-module (gnu packages ed) | |
26 | #:use-module (gnu packages bison) | |
27 | #:use-module (gnu packages groff) | |
28 | #:use-module (gnu packages compression) | |
29 | #:use-module (guix build-system gnu)) | |
30 | ||
31 | (define-public cook | |
32 | (package | |
33 | (name "cook") | |
34 | (version "2.34") | |
35 | (source | |
36 | (origin | |
37 | (method url-fetch) | |
a000f3c4 | 38 | (uri "http://fossies.org/linux/misc/old/cook-2.34.tar.gz") |
feadf100 JD |
39 | (sha256 |
40 | (base32 | |
41 | "104saqnqql1l7zr2pm3f718fdky3ds8j07c6xvwrs1rfkhrw58yw")))) | |
42 | (build-system gnu-build-system) | |
43 | (arguments | |
44 | `(#:parallel-build? #f ; There are some nasty racy rules in the Makefile. | |
a124bbd2 | 45 | #:phases |
ea5d238d TGR |
46 | (modify-phases %standard-phases |
47 | (add-before 'configure 'pre-conf | |
48 | (lambda _ | |
49 | (substitute* (append '("common/env.c") | |
50 | (find-files "test" "\\.sh")) | |
51 | (("/bin/sh") (which "sh"))) | |
feadf100 | 52 | |
ea5d238d TGR |
53 | ;; Guix's binutils (because it wants bit-reproducable builds) is |
54 | ;; is configured with the --enable-deterministic-archives flag. | |
55 | ;; This means the timestamp of files appended to an ar archive | |
56 | ;; are automatically and silently mutated to 00:00 1 Jan 1970 | |
57 | ;; which plays havoc with this test, for which correct timestamps | |
58 | ;; are very important. Adding the U flag undoes the effect of | |
59 | ;; --enable-deterministic-archives and allows this test to work | |
60 | ;; again. | |
61 | (substitute* "test/00/t0077a.sh" | |
62 | (("ar qc") "ar qcU")) | |
feadf100 | 63 | |
2e3d5fdf MB |
64 | ;; Guix builds have LC_ALL set to "en_US.utf8", which causes |
65 | ;; `date` to use a 12-hour clock instead of 24h, which in turn | |
66 | ;; makes t0217a.sh fail because of unexpected date output. | |
67 | (substitute* "test/02/t0217a.sh" | |
68 | (("export TZ") | |
69 | "export TZ\nLC_ALL=POSIX\nexport LC_ALL")) | |
70 | ||
ea5d238d TGR |
71 | (setenv "SH" (which "sh")) |
72 | #t))))) | |
feadf100 JD |
73 | (native-inputs `(("bison" ,bison) |
74 | ;; For building the documentation: | |
75 | ("groff" ,groff) | |
76 | ;; For the tests: | |
77 | ("sharutils" ,sharutils) | |
78 | ;; One test wants rsh. However there is no rsh server | |
79 | ;; running in the build environment and so far as I'm | |
80 | ;; aware, it cannot be started without root. | |
81 | ;; This test is therefore just skipped. | |
82 | ;; ("inetutils" ,inetutils) | |
83 | ("ed" ,ed))) | |
1fddf8ef TGR |
84 | (home-page (string-append "https://web.archive.org/web/20140727122520/" |
85 | "http://miller.emu.id.au/pmiller/software/cook/")) | |
9e771e3b | 86 | (synopsis "Tool for constructing files") |
35b9e423 EB |
87 | (description "Cook is a tool for constructing files. It is given a set of |
88 | files to create, and recipes of how to create them. In any non-trivial program | |
feadf100 | 89 | there will be prerequisites to performing the actions necessary to creating |
35b9e423 | 90 | any file, such as include files. Cook provides a mechanism to define these.") |
feadf100 | 91 | (license gpl3+))) |