Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / cook.scm
CommitLineData
feadf100
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU 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;;; GNU 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 GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages cook)
20 #:use-module (guix packages)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (gnu packages ed)
24 #:use-module (gnu packages bison)
25 #:use-module (gnu packages groff)
26 #:use-module (gnu packages compression)
27 #:use-module (guix build-system gnu))
28
29(define-public cook
30 (package
31 (name "cook")
32 (version "2.34")
33 (source
34 (origin
35 (method url-fetch)
a000f3c4 36 (uri "http://fossies.org/linux/misc/old/cook-2.34.tar.gz")
feadf100
JD
37 (sha256
38 (base32
39 "104saqnqql1l7zr2pm3f718fdky3ds8j07c6xvwrs1rfkhrw58yw"))))
40 (build-system gnu-build-system)
41 (arguments
42 `(#:parallel-build? #f ; There are some nasty racy rules in the Makefile.
a124bbd2 43 #:phases
feadf100
JD
44 (alist-cons-before
45 'configure 'pre-conf
a124bbd2 46 (lambda _
feadf100
JD
47 (substitute* (append '("common/env.c")
48 (find-files "test" "\\.sh"))
49 (("/bin/sh") (which "sh")))
50
51 ;; Guix's binutils (because it wants bit-reproducable builds) is
52 ;; is configured with the --enable-deterministic-archives flag.
53 ;; This means the timestamp of files appended to an ar archive
54 ;; are automatically and silently mutated to 00:00 1 Jan 1970
55 ;; which plays havoc with this test, for which correct timestamps
56 ;; are very important. Adding the U flag undoes the effect of
57 ;; --enable-deterministic-archives and allows this test to work
a124bbd2 58 ;; again.
feadf100
JD
59 (substitute* "test/00/t0077a.sh"
60 (("ar qc") "ar qcU"))
61
62 (setenv "SH" (which "sh")))
63 %standard-phases)))
64 (native-inputs `(("bison" ,bison)
65 ;; For building the documentation:
66 ("groff" ,groff)
67 ;; For the tests:
68 ("sharutils" ,sharutils)
69 ;; One test wants rsh. However there is no rsh server
70 ;; running in the build environment and so far as I'm
71 ;; aware, it cannot be started without root.
72 ;; This test is therefore just skipped.
73 ;; ("inetutils" ,inetutils)
74 ("ed" ,ed)))
75 (home-page "http://miller.emu.id.au/pmiller/software/cook")
9e771e3b 76 (synopsis "Tool for constructing files")
35b9e423
EB
77 (description "Cook is a tool for constructing files. It is given a set of
78files to create, and recipes of how to create them. In any non-trivial program
feadf100 79there will be prerequisites to performing the actions necessary to creating
35b9e423 80any file, such as include files. Cook provides a mechanism to define these.")
feadf100 81 (license gpl3+)))