cook.scm 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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>
  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. (define-module (gnu packages cook)
  21. #:use-module (guix packages)
  22. #:use-module (guix licenses)
  23. #:use-module (guix download)
  24. #:use-module (gnu packages ed)
  25. #:use-module (gnu packages bison)
  26. #:use-module (gnu packages groff)
  27. #:use-module (gnu packages compression)
  28. #:use-module (guix build-system gnu))
  29. (define-public cook
  30. (package
  31. (name "cook")
  32. (version "2.34")
  33. (source
  34. (origin
  35. (method url-fetch)
  36. (uri "http://fossies.org/linux/misc/old/cook-2.34.tar.gz")
  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.
  43. #:phases
  44. (modify-phases %standard-phases
  45. (add-before 'configure 'pre-conf
  46. (lambda _
  47. (substitute* (append '("common/env.c")
  48. (find-files "test" "\\.sh"))
  49. (("/bin/sh") (which "sh")))
  50. ;; Guix's binutils (because it wants bit-reproducable builds) is
  51. ;; is configured with the --enable-deterministic-archives flag.
  52. ;; This means the timestamp of files appended to an ar archive
  53. ;; are automatically and silently mutated to 00:00 1 Jan 1970
  54. ;; which plays havoc with this test, for which correct timestamps
  55. ;; are very important. Adding the U flag undoes the effect of
  56. ;; --enable-deterministic-archives and allows this test to work
  57. ;; again.
  58. (substitute* "test/00/t0077a.sh"
  59. (("ar qc") "ar qcU"))
  60. ;; Guix builds have LC_ALL set to "en_US.utf8", which causes
  61. ;; `date` to use a 12-hour clock instead of 24h, which in turn
  62. ;; makes t0217a.sh fail because of unexpected date output.
  63. (substitute* "test/02/t0217a.sh"
  64. (("export TZ")
  65. "export TZ\nLC_ALL=POSIX\nexport LC_ALL"))
  66. (setenv "SH" (which "sh"))
  67. #t)))))
  68. (native-inputs `(("bison" ,bison)
  69. ;; For building the documentation:
  70. ("groff" ,groff)
  71. ;; For the tests:
  72. ("sharutils" ,sharutils)
  73. ;; One test wants rsh. However there is no rsh server
  74. ;; running in the build environment and so far as I'm
  75. ;; aware, it cannot be started without root.
  76. ;; This test is therefore just skipped.
  77. ;; ("inetutils" ,inetutils)
  78. ("ed" ,ed)))
  79. (home-page (string-append "https://web.archive.org/web/20140727122520/"
  80. "http://miller.emu.id.au/pmiller/software/cook/"))
  81. (synopsis "Tool for constructing files")
  82. (description "Cook is a tool for constructing files. It is given a set of
  83. files to create, and recipes of how to create them. In any non-trivial program
  84. there will be prerequisites to performing the actions necessary to creating
  85. any file, such as include files. Cook provides a mechanism to define these.")
  86. (license gpl3+)))