1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
38 (uri "http://fossies.org/linux/misc/old/cook-2.34.tar.gz")
41 "104saqnqql1l7zr2pm3f718fdky3ds8j07c6xvwrs1rfkhrw58yw"))))
42 (build-system gnu-build-system)
44 `(#:parallel-build? #f ; There are some nasty racy rules in the Makefile.
46 (modify-phases %standard-phases
47 (add-before 'configure 'pre-conf
49 (substitute* (append '("common/env.c")
50 (find-files "test" "\\.sh"))
51 (("/bin/sh") (which "sh")))
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
61 (substitute* "test/00/t0077a.sh"
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"
69 "export TZ\nLC_ALL=POSIX\nexport LC_ALL"))
71 (setenv "SH" (which "sh"))
73 (native-inputs `(("bison" ,bison)
74 ;; For building the documentation:
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)
84 (home-page (string-append "https://web.archive.org/web/20140727122520/"
85 "http://miller.emu.id.au/pmiller/software/cook/"))
86 (synopsis "Tool for constructing files")
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
89 there will be prerequisites to performing the actions necessary to creating
90 any file, such as include files. Cook provides a mechanism to define these.")