~ruther/guix-local

d4bf49b140bd5cfb3580d2a038679160dc1331b5 — Eric Bavier 12 years ago 36b5851
gnu: Remove unused lambda arguments and prefer separate phases over
augmented phases.

* gnu/packages/compression.scm (sharutils) [arguments]: Remove unused
  lambda args.
* gnu/packages/gl.scm (mesa) [arguments]: Same
* gnu/packages/fltk.scm [arguments]: Same.  Substitute const check
  phase with #:tests? #f.  Add pre-configure phase.
* gnu/packages/ghostscript.scm (ghostscript) [arguments]: Put makefile
  patches in separate phase.  Put so steps oinseparate phases.
* gnu/packages/glib.scm (gobject-introspection) [arguments]: Remove
  unused lambda args.  Put patches in pre-configure phase.
* gnu/packages/gnupg.scm (gnupg) [arguments]: Put patch in
  pre-configure phase.
  (pius) [arguments]: Delete const #t configure and build phases.
  (signing-party) [arguments]: Factor patches into post-unpack phase.
  (paperkey) [arguments]: Remove unused lambda args.  Factor out
  patches into pre-check phase.
* gnu/packages/icu4c.scm [arguments]: Change source dir after standard
  unpack phase.  Factor configure patches into pre-configure phase.
* gnu/packages/lsof.scm [arguments]: Remove unused lambda args.
  Remove unnecessary apply.
* gnu/packages/lvm.scm (lvm2) [arguments]: Factor out patches into
  pre-configure phase.
* gnu/packages/libtiff.scm [arguments]: Same
* gnu/packages/maths.scm (hdf5) [arguments]: Same
* gnu/packages/gtk.scm (gtk+-2) [arguments]: Same
* gnu/packages/mp3.scm (libmad) [arguments]: Same
  (id3lib) [arguments]: Same
* gnu/packages/python.scm (python-2) [arguments]: Same
* gnu/packages/texlive.scm (texlive) [arguments]: Same
* gnu/packages/pretty-print.scm (a2ps) [arguments]: Same
  (trueprint) [arguments]: Same
  (source-highlight) [arguments]: Same.  Remove unused lambda args.
* gnu/packages/netpbm.scm [arguments]: Remove unused lambda args.
  Factor out test patches into pre-check phase.  Condense calls to
  substitute*
* gnu/packages/openldap.scm [arguments]: Factor out libtool copy into
  post-configure phases. [synopsis] Remove package name.
* gnu/packages/ssh.scm (openssh) [arguments]: Factor out patches into
  separate phases.
* gnu/packages/tcsh.scm [arguments]: Factor out test patches into
  pre-check phase.
* gnu/packages/version-control.scm (git) [arguments]: Factor out
  patches into post-configure phase.
* gnu/packages/vim.scm [arguments]: Same. [synopsis] Remove package
  name.
* gnu/packages/vpn.scm (openconnect) [arguments]: Put configure flags
  in #:configure-flags
M gnu/packages/compression.scm => gnu/packages/compression.scm +1 -1
@@ 280,7 280,7 @@ archiving.  Lzip is a clean implementation of the LZMA algorithm.")
         'patch-source-shebangs 'unpatch-source-shebang
         ;; revert the patch-shebang phase on a script which is
         ;; in fact test data
         (lambda* (#:key #:allow-other-keys)
         (lambda _
           (substitute* "tests/shar-1.ok"
             (((which "sh")) "/bin/sh")))
         %standard-phases)))

M gnu/packages/fltk.scm => gnu/packages/fltk.scm +8 -13
@@ 40,19 40,14 @@
      `(("libx11" ,libx11)
        ("mesa" ,mesa)))
    (arguments
     `(#:phases
       (alist-replace
        'check
        (lambda* (#:key inputs #:allow-other-keys) #t) ;; fltk does not have a
                                                       ;; check target
        (alist-replace
         'configure
         (lambda* (#:key outputs #:allow-other-keys #:rest args)
           (let ((configure (assoc-ref %standard-phases 'configure)))
             (substitute* "makeinclude.in"
               (("/bin/sh") (which "sh")))
             (apply configure args)))
         %standard-phases))))
     `(#:tests? #f                      ;TODO: compile programs in "test" dir
       #:phases
       (alist-cons-before
        'configure 'patch-makeinclude
        (lambda _
          (substitute* "makeinclude.in"
            (("/bin/sh") (which "sh"))))
        %standard-phases)))
    (home-page "https://www.fltk.org")
    (synopsis "3D C++ GUI library")
    (description "FLTK is a C++ GUI toolkit providing modern GUI functionality without the

M gnu/packages/ghostscript.scm => gnu/packages/ghostscript.scm +13 -21
@@ 142,27 142,19 @@ printing, and psresize, for adjusting page sizes.")
        ("tcl" ,tcl)))
   (arguments
    `(#:phases
      (alist-replace
       'configure
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((configure (assoc-ref %standard-phases 'configure)))
          (apply configure args)
          (substitute* "base/all-arch.mak"
            (("/bin/sh") (which "bash")))
          (substitute* "base/unixhead.mak"
            (("/bin/sh") (which "bash")))))
      (alist-replace
       'build
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((build (assoc-ref %standard-phases 'build)))
          (apply build args)
          (system* "make" "so")))
      (alist-replace
       'install
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((install (assoc-ref %standard-phases 'install)))
          (apply install args)
          (system* "make" "install-so")))
      (alist-cons-after
       'configure 'patch-config-files
       (lambda _
         (substitute* "base/all-arch.mak"
           (("/bin/sh") (which "bash")))
         (substitute* "base/unixhead.mak"
           (("/bin/sh") (which "bash"))))
      (alist-cons-after
       'build 'build-so
       (lambda _ (system* "make" "so"))
      (alist-cons-after
       'install 'install-so
       (lambda _ (system* "make" "install-so"))
      %standard-phases)))))
   (synopsis "PostScript and PDF interpreter")
   (description

M gnu/packages/gl.scm => gnu/packages/gl.scm +1 -1
@@ 159,7 159,7 @@ Polygon meshes, and Extruded polygon meshes")
        #:phases
         (alist-cons-after
          'unpack 'remove-symlink
          (lambda* (#:key #:allow-other-keys)
          (lambda _
            ;; remove dangling symlink to /usr/include/wine/windows
            (delete-file "src/gallium/state_trackers/d3d1x/w32api"))
         %standard-phases)))

M gnu/packages/glib.scm => gnu/packages/glib.scm +4 -6
@@ 196,13 196,11 @@ dynamic loading, and an object system.")
       ("libffi" ,libffi)))
    (arguments
     `(#:phases
        (alist-replace
         'configure
         (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((configure (assoc-ref %standard-phases 'configure)))
        (alist-cons-before
         'configure 'patch-paths
         (lambda _
           (substitute* "giscanner/sourcescanner.py"
             (("GUIX_GCC_PATH") (which "gcc")))
           (apply configure args)))
             (("GUIX_GCC_PATH") (which "gcc"))))
         %standard-phases)))
    (home-page "https://wiki.gnome.org/GObjectIntrospection")
    (synopsis "Generate interface introspection data for GObject libraries")

M gnu/packages/gnupg.scm => gnu/packages/gnupg.scm +16 -26
@@ 191,13 191,11 @@ specifications are building blocks of S/MIME and TLS.")
       ("readline" ,readline)))
   (arguments
    `(#:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           (substitute* "tests/openpgp/Makefile.in"
             (("/bin/sh") (which "bash")))
           (apply configure args)))
       (alist-cons-before
        'configure 'patch-config-files
        (lambda _
          (substitute* "tests/openpgp/Makefile.in"
            (("/bin/sh") (which "bash"))))
       %standard-phases)))
    (home-page "http://gnupg.org/")
    (synopsis "GNU Privacy Guard")


@@ 286,12 284,10 @@ and every application benefits from this.")
   (arguments
    `(#:tests? #f
      #:phases
       (alist-replace
       (alist-delete
        'configure
        (lambda* (#:key #:allow-other-keys) #t)
       (alist-replace
       (alist-delete
        'build
        (lambda* (#:key #:allow-other-keys) #t)
       (alist-replace
        'install
        (lambda* (#:key inputs outputs #:allow-other-keys)


@@ 334,13 330,9 @@ PGP keysigning parties.")
   (arguments
    `(#:tests? #f
      #:phases
      (alist-replace
       'unpack
       (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((unpack (assoc-ref %standard-phases 'unpack)))
           (apply unpack args)
           ;; remove spurious symlink
           (delete-file "keyanalyze/pgpring/depcomp")))
      (alist-cons-after
       'unpack 'remove-spurious-links
       (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))
      (alist-replace
       'configure
       (lambda* (#:key outputs #:allow-other-keys)


@@ 463,14 455,12 @@ enter a passphrase when `gpg' or `gpg2' is run and needs it.")
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (alist-replace
        'check
        (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((check (assoc-ref %standard-phases 'check)))
            (substitute* '("checks/roundtrip.sh"
                           "checks/roundtrip-raw.sh")
              (("/bin/echo") "echo"))
            (apply check args)))
       (alist-cons-before
        'check 'patch-check-scripts
        (lambda _
          (substitute* '("checks/roundtrip.sh"
                         "checks/roundtrip-raw.sh")
            (("/bin/echo") "echo")))
        %standard-phases)))
    (home-page "http://www.jabberwocky.com/software/paperkey/")
    (synopsis "Backup OpenPGP keys to paper")

M gnu/packages/gtk.scm => gnu/packages/gtk.scm +6 -8
@@ 331,14 331,12 @@ is part of the GNOME accessibility project.")
      ("python-wrapper" ,python-wrapper)))
   (arguments
    `(#:phases
      (alist-replace
       'configure
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((configure (assoc-ref %standard-phases 'configure)))
          ;; FIXME: re-enable tests requiring an X server
          (substitute* "gtk/Makefile.in"
           (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
          (apply configure args)))
      (alist-cons-before
       'configure 'disable-tests
       (lambda _
         ;; FIXME: re-enable tests requiring an X server
         (substitute* "gtk/Makefile.in"
           (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
      %standard-phases)))
   (synopsis "Cross-platform toolkit for creating graphical user interfaces")
   (description

M gnu/packages/icu4c.scm => gnu/packages/icu4c.scm +11 -15
@@ 51,21 51,17 @@
                          (guix build utils)
                          (guix build rpath))
      #:phases
      (alist-replace
       'unpack
       (lambda* (#:key source #:allow-other-keys)
        (and (zero? (system* "tar" "xvf" source))
             (chdir "icu/source")))
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           ;; patch out two occurrences of /bin/sh from configure script
           ;; that might have disappeared in a release later than 52.1
           (substitute* "configure"
             (("`/bin/sh")
             (string-append "`" (which "bash"))))
           (apply configure args)))
      (alist-cons-after
       'unpack 'chdir-to-source
       (lambda _ (chdir "source"))
       (alist-cons-before
        'configure 'patch-configure
        (lambda _
          ;; patch out two occurrences of /bin/sh from configure script
          ;; that might have disappeared in a release later than 52.1
          (substitute* "configure"
            (("`/bin/sh")
             (string-append "`" (which "bash")))))
       (alist-cons-after
        'strip 'add-lib-to-runpath
        (lambda* (#:key outputs #:allow-other-keys)

M gnu/packages/libtiff.scm => gnu/packages/libtiff.scm +6 -8
@@ 47,14 47,12 @@
                           (assoc-ref %build-inputs "libjpeg-8")
                           "/include"))
      #:phases
      (alist-replace
       'configure
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((configure (assoc-ref %standard-phases 'configure)))
          (substitute* "configure"
            (("`/usr/bin/file")
            (string-append "`" (which "file"))))
          (apply configure args)))
      (alist-cons-before
       'configure 'patch-configure
       (lambda _
         (substitute* "configure"
           (("`/usr/bin/file")
            (string-append "`" (which "file")))))
      %standard-phases)))
   (synopsis "Libtiff, a library for handling TIFF files")
   (description

M gnu/packages/lsof.scm => gnu/packages/lsof.scm +4 -4
@@ 41,13 41,13 @@
      #:phases
      (alist-replace
       'unpack
       (lambda* (#:key source name version #:allow-other-keys)
       (lambda* (#:key source #:allow-other-keys)
         (let ((unpack (assoc-ref %standard-phases 'unpack)))
           (apply unpack (list #:source source))
           (apply unpack (list #:source (car (find-files "." "\\.tar$"))))))
           (unpack #:source source)
           (unpack #:source (car (find-files "." "\\.tar$")))))
      (alist-replace
       'configure
       (lambda* (#:key #:allow-other-keys)
       (lambda _
         (setenv "LSOF_CC" "gcc")
         (setenv "LSOF_MAKE" "make")
         (system* "./Configure" "linux"))

M gnu/packages/lvm.scm => gnu/packages/lvm.scm +6 -8
@@ 46,14 46,12 @@
      #:configure-flags
       `(,(string-append "--with-confdir=" (assoc-ref %outputs "out") "/etc"))
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((configure (assoc-ref %standard-phases 'configure)))
            (substitute* "make.tmpl.in"
              (("/bin/sh") (which "sh"))
              (("CC \\?=") "CC =")) ; force CC argument to be set from configure
            (apply configure args)))
       (alist-cons-before
        'configure 'patch-make-tmpl
        (lambda _
          (substitute* "make.tmpl.in"
            (("/bin/sh") (which "sh"))
            (("CC \\?=") "CC ="))) ; force CC argument to be set from configure
         %standard-phases)))
   (synopsis "logical volume management")
   (description

M gnu/packages/maths.scm => gnu/packages/maths.scm +7 -8
@@ 250,20 250,19 @@ plotting engine by third-party applications like Octave.")
    (build-system gnu-build-system)
    (arguments
     `(#:phases
        (alist-replace
         'configure
         (lambda* (#:key target system outputs #:allow-other-keys #:rest args)
           (let ((configure (assoc-ref %standard-phases 'configure)))
             (substitute* "configure"
                   (("/bin/mv") "mv"))
             (apply configure args)))
        (alist-cons-before
         'configure 'patch-configure
         (lambda _
           (substitute* "configure"
             (("/bin/mv") "mv")))
         %standard-phases)))
    (outputs '("out" "bin" "lib" "include"))
    (home-page "http://www.hdfgroup.org")
    (synopsis "Management suite for  extremely large and complex data")
    (description "HDF5 is a suite that makes possible the management of
extremely large and complex data collections.")
    (license (license:x11-style "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
    (license (license:x11-style
              "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))


;; For a fully featured Octave, users  are strongly recommended also to install

M gnu/packages/mp3.scm => gnu/packages/mp3.scm +18 -21
@@ 50,13 50,11 @@
   (build-system gnu-build-system)
   (arguments
    `(#:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           ;; remove option that is not supported by gcc any more
           (substitute* "configure" ((" -fforce-mem") ""))
           (apply configure args)))
       (alist-cons-before
        'configure 'remove-unsupported-gcc-flags
        (lambda _
          ;; remove option that is not supported by gcc any more
          (substitute* "configure" ((" -fforce-mem") "")))
       %standard-phases)))
   (synopsis "libmad, an MPEG audio decoder")
   (description


@@ 105,20 103,19 @@ versions of ID3v2")
   (build-system gnu-build-system)
   (arguments
    `(#:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((configure (assoc-ref %standard-phases 'configure)))
            (substitute* "configure"
              (("iomanip.h") "")) ; drop check for unused header
            ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
            (substitute* "include/id3/id3lib_strings.h"
              (("include <string>") "include <cstring>\n#include <string>"))
            (substitute* "include/id3/writers.h"
              (("//\\#include <string.h>") "#include <cstring>"))
            (substitute* "examples/test_io.cpp"
              (("dami;") "dami;\nusing namespace std;"))
            (apply configure args)))
       (alist-cons-before
        'configure 'apply-patches
        ;; TODO: create a patch for origin instead?
        (lambda _
          (substitute* "configure"
            (("iomanip.h") "")) ; drop check for unused header
          ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
          (substitute* "include/id3/id3lib_strings.h"
            (("include <string>") "include <cstring>\n#include <string>"))
          (substitute* "include/id3/writers.h"
            (("//\\#include <string.h>") "#include <cstring>"))
          (substitute* "examples/test_io.cpp"
            (("dami;") "dami;\nusing namespace std;")))
         %standard-phases)))
   (synopsis "a library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
   (description

M gnu/packages/netpbm.scm => gnu/packages/netpbm.scm +23 -24
@@ 64,7 64,7 @@
    `(#:phases
      (alist-replace
       'configure
       (lambda* (#:key #:allow-other-keys #:rest args)
       (lambda _
        (copy-file "config.mk.in" "config.mk")
        (let ((f (open-file "config.mk" "a")))
         (display "CC=gcc\n" f)


@@ 77,30 77,29 @@
         (substitute* "converter/ppm/Makefile" (("hpcdtoppm") ""))
         ;; drop programs without license, see
         ;; http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright
         (substitute* "converter/pbm/Makefile" (("pbmto4425") ""))
         (substitute* "converter/pbm/Makefile" (("pbmtoln03") ""))
         (substitute* "converter/pbm/Makefile" (("pbmtolps") ""))
         (substitute* "converter/pbm/Makefile" (("pbmtopk") ""))
         (substitute* "converter/pbm/Makefile" (("pktopbm") ""))
         (substitute* "converter/pbm/Makefile"
           (("pbmto4425") "")
           (("pbmtoln03") "")
           (("pbmtolps") "")
           (("pbmtopk") "")
           (("pktopbm") ""))
         (substitute* "converter/pgm/Makefile" (("spottopgm") ""))
         (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))
         ))
      (alist-replace
       'check
       (lambda* (#:key #:allow-other-keys #:rest args)
        (let ((check (assoc-ref %standard-phases 'check)))
          ;; install temporarily into /tmp/netpbm
          (system* "make" "package")
          ;; remove test requiring X
          (substitute* "test/all-in-place.test" (("pamx") ""))
          ;; do not worry about non-existing file
          (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
          ;; remove four tests that fail for unknown reasons
          (substitute* "test/Test-Order" (("all-in-place.test") ""))
          (substitute* "test/Test-Order" (("pnmpsnr.test") ""))
          (substitute* "test/Test-Order" (("pnmremap1.test") ""))
          (substitute* "test/Test-Order" (("gif-roundtrip.test") ""))
          (apply check args)))
         (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))))
      (alist-cons-before
       'check 'setup-check
       (lambda _
         ;; install temporarily into /tmp/netpbm
         (system* "make" "package")
         ;; remove test requiring X
         (substitute* "test/all-in-place.test" (("pamx") ""))
         ;; do not worry about non-existing file
         (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
         ;; remove four tests that fail for unknown reasons
         (substitute* "test/Test-Order"
           (("all-in-place.test") "")
           (("pnmpsnr.test") "")
           (("pnmremap1.test") "")
           (("gif-roundtrip.test") "")))
      (alist-replace
       'install
       (lambda* (#:key outputs make-flags #:allow-other-keys)

M gnu/packages/openldap.scm => gnu/packages/openldap.scm +4 -7
@@ 57,14 57,11 @@
   (arguments
    `(#:tests? #f
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           (apply configure args)
           (copy-file (which "libtool") "libtool")))
       (alist-cons-after
        'configure 'provide-libtool
        (lambda _ (copy-file (which "libtool") "libtool"))
       %standard-phases)))
   (synopsis "openldap, an implementation of the Lightweight Directory Access Protocol")
   (synopsis "Implementation of the Lightweight Directory Access Protocol")
   (description
    "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
   (license openldap2.8)

M gnu/packages/pretty-print.scm => gnu/packages/pretty-print.scm +16 -22
@@ 56,13 56,11 @@
       ("perl" ,perl)
       ("file" ,file)))
    (arguments
     '(#:phases (alist-replace
                 'configure
                 (lambda* (#:key #:allow-other-keys #:rest args)
                   (let ((configure (assoc-ref %standard-phases 'configure)))
                     (substitute* "configure"
                       (("/usr/bin/file") (which "file")))
                     (apply configure args)))
     '(#:phases (alist-cons-before
                 'configure 'patch-configure
                 (lambda _
                   (substitute* "configure"
                     (("/usr/bin/file") (which "file"))))
                 (alist-cons-before
                  'build 'patch-scripts
                  (lambda _


@@ 121,13 119,11 @@ special cases, such as pretty-printing \"--help\" output.")
    (arguments
     ;; Must define DIFF_CMD for tests to pass
     '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"")
       #:phases (alist-replace
                 'configure
                 (lambda* (#:key #:allow-other-keys #:rest args)
                   (let ((configure (assoc-ref %standard-phases 'configure)))
                     (substitute* "configure"
                       (("/usr/bin/file") (which "file")))
                     (apply configure args)))
       #:phases (alist-cons-before
                 'configure 'patch-configure
                 (lambda _
                   (substitute* "configure"
                     (("/usr/bin/file") (which "file"))))
                 %standard-phases)))
    (home-page "http://www.gnu.org/software/trueprint")
    (synopsis "Pretty-print C sources and other plain text to PostScript")


@@ 189,16 185,14 @@ different programming languages.")
       (list (string-append "--with-boost="
                            (assoc-ref %build-inputs "boost")))
       #:parallel-tests? #f             ;There appear to be race conditions
       #:phases (alist-replace
                 'configure
                 (lambda* (#:key #:allow-other-keys #:rest args)
                   (let ((configure (assoc-ref %standard-phases 'configure)))
                     (substitute* "configure"
                       (("/usr/bin/file") (which "file")))
                     (apply configure args)))
       #:phases (alist-cons-before
                 'configure 'patch-configure
                 (lambda _
                   (substitute* "configure"
                     (("/usr/bin/file") (which "file"))))
                 (alist-cons-before
                  'check 'patch-test-files
                  (lambda* (#:key inputs #:allow-other-keys)
                  (lambda _
                    ;; Unpatch shebangs in test input so that source-highlight
                    ;; is still able to infer input language
                    (substitute* '("tests/test.sh"

M gnu/packages/python.scm => gnu/packages/python.scm +7 -12
@@ 139,18 139,13 @@
             (with-directory-excursion out
               (for-each (cut augment-rpath <> lib)
                         (find-files "bin" ".*")))))
         (alist-replace
          'configure
          (lambda* (#:key outputs #:allow-other-keys #:rest args)
            (let ((configure (assoc-ref %standard-phases 'configure)))
             (substitute* "Lib/subprocess.py"
               (("args = \\[\"/bin/sh")
                (string-append "args = [\"" (which "sh"))))
             (substitute*
               '("Lib/distutils/tests/test_spawn.py"
                 "Lib/test/test_subprocess.py")
               (("/bin/sh") (which "sh")))
             (apply configure args)))
         (alist-cons-before
          'configure 'patch-lib-shells
          (lambda _
            (substitute* '("Lib/subprocess.py"
                           "Lib/distutils/tests/test_spawn.py"
                           "Lib/test/test_subprocess.py")
              (("/bin/sh") (which "sh"))))
          (alist-cons-before
           'check 'pre-check
           (lambda _

M gnu/packages/ssh.scm => gnu/packages/ssh.scm +13 -17
@@ 140,23 140,19 @@ a server that supports the SSH-2 protocol.")
   (arguments
    `(#:test-target "tests"
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key outputs #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure))
               (out (assoc-ref outputs "out")))
           (apply configure args)
           (substitute* "Makefile"
                        (("PRIVSEP_PATH=/var/empty")
                        (string-append "PRIVSEP_PATH=" out "/var/empty")))))
       (alist-replace
        'check
        (lambda* (#:key #:allow-other-keys #:rest args)
         (let ((check (assoc-ref %standard-phases 'check)))
           ;; remove tests that require the user sshd
           (substitute* "regress/Makefile"
                        (("t10 t-exec") "t10"))
           (apply check args)))
       (alist-cons-after
        'configure 'reset-/var/empty
        (lambda* (#:key outputs #:allow-other-keys)
          (let ((out (assoc-ref outputs "out")))
            (substitute* "Makefile"
              (("PRIVSEP_PATH=/var/empty")
               (string-append "PRIVSEP_PATH=" out "/var/empty")))))
       (alist-cons-before
        'check 'patch-tests
        (lambda _
          ;; remove tests that require the user sshd
          (substitute* "regress/Makefile"
            (("t10 t-exec") "t10")))
       (alist-replace
        'install
        (lambda* (#:key (make-flags '()) #:allow-other-keys)

M gnu/packages/tcsh.scm => gnu/packages/tcsh.scm +14 -17
@@ 45,23 45,20 @@
       ("ncurses" ,ncurses)))
    (arguments
     `(#:phases
       (alist-replace
        'check
        (lambda* (#:key inputs #:allow-other-keys #:rest args)
          (let ((check (assoc-ref %standard-phases 'check)))
            ;; Take care of pwd
            (substitute* '("tests/commands.at" "tests/variables.at")
              (("/bin/pwd") (which "pwd")))
            ;; The .at files create shell scripts without shebangs. Erk.
            (substitute* "tests/commands.at"
              (("./output.sh") "/bin/sh output.sh"))
            (substitute* "tests/syntax.at"
              (("; other_script.csh") "; /bin/sh other_script.csh"))
            ;; Now, let's generate the test suite, patch it and finally run the
            ;; tests.
            (system* "make" "tests/testsuite")
            (substitute* "tests/testsuite" (("/bin/sh") (which "sh")))
            (apply check args)))
       (alist-cons-before
        'check 'patch-test-scripts
        (lambda _
          ;; Take care of pwd
          (substitute* '("tests/commands.at" "tests/variables.at")
            (("/bin/pwd") (which "pwd")))
          ;; The .at files create shell scripts without shebangs. Erk.
          (substitute* "tests/commands.at"
            (("./output.sh") "/bin/sh output.sh"))
          (substitute* "tests/syntax.at"
            (("; other_script.csh") "; /bin/sh other_script.csh"))
          ;; Now, let's generate the test suite and patch it
          (system* "make" "tests/testsuite")
          (substitute* "tests/testsuite" (("/bin/sh") (which "sh"))))
        (alist-cons-after
         'install 'post-install
         (lambda* (#:key inputs outputs #:allow-other-keys)

M gnu/packages/texlive.scm => gnu/packages/texlive.scm +4 -6
@@ 116,12 116,10 @@
         "--with-system-zziplib")
      #:phases
       (alist-replace
        'configure
        (lambda* (#:key outputs #:allow-other-keys #:rest args)
         (let ((configure (assoc-ref %standard-phases 'configure)))
           (substitute* "utils/psutils/Makefile.in"
             (("/usr/bin/env perl") (which "perl")))
           (apply configure args)))
        'configure 'patch-perl-shebang
        (lambda _
          (substitute* "utils/psutils/Makefile.in"
            (("/usr/bin/env perl") (which "perl"))))
       (alist-cons-after
        'install 'postinst
         (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)

M gnu/packages/version-control.scm => gnu/packages/version-control.scm +7 -9
@@ 117,15 117,13 @@ as well as the classic centralized workflow.")
                                             "/bin/wish8.6")) ; XXX

      #:phases
       (alist-replace
        'configure
        (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((configure (assoc-ref %standard-phases 'configure)))
            (and (apply configure args)
                 (substitute* "Makefile"
                   (("/bin/sh") (which "sh"))
                   (("/usr/bin/perl") (which "perl"))
                   (("/usr/bin/python") (which "python"))))))
       (alist-cons-after
        'configure 'patch-makefile-shebangs
        (lambda _
          (substitute* "Makefile"
            (("/bin/sh") (which "sh"))
            (("/usr/bin/perl") (which "perl"))
            (("/usr/bin/python") (which "python"))))
        (alist-cons-after
         'install 'split
         (lambda* (#:key inputs outputs #:allow-other-keys)

M gnu/packages/vim.scm => gnu/packages/vim.scm +6 -8
@@ 44,15 44,13 @@
     `(#:test-target "test"
       #:parallel-tests? #f
       #:phases
        (alist-replace
         'configure
         (lambda* (#:key #:allow-other-keys #:rest args)
          (let ((configure (assoc-ref %standard-phases 'configure)))
           (apply configure args)
        (alist-cons-after
         'configure 'patch-config-files
         (lambda _
           (substitute* "runtime/tools/mve.awk"
             (("/usr/bin/nawk") (which "gawk")))
           (substitute* "src/testdir/Makefile"
             (("/bin/sh") (which "sh")))))
             (("/bin/sh") (which "sh"))))
          %standard-phases)))
    (inputs
     `(("gawk", gawk)


@@ 61,7 59,7 @@
       ("perl", perl)
       ("tcsh" ,tcsh))) ; For runtime/tools/vim32
    (home-page "http://www.vim.org/")
    (synopsis "VIM 7.3, a text editor based on vi.")
    (synopsis "Text editor based on vi")
    (description
     "Vim is a highly configurable text editor built to enable efficient text
editing. It is an improved version of the vi editor distributed with most UNIX


@@ 70,5 68,5 @@ systems.
Vim is often called a \"programmer's editor,\" and so useful for programming
that many consider it an entire IDE. It's not just for programmers, though. Vim
is perfect for all kinds of text editing, from composing email to editing
configuration files. ")
configuration files.")
    (license license:vim)))

M gnu/packages/vpn.scm => gnu/packages/vpn.scm +7 -15
@@ 1,6 1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 98,8 99,8 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
   (version "4.99")
   (source (origin
            (method url-fetch)
            (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/openconnect-"
                                version ".tar.gz"))
            (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
                                "openconnect-" version ".tar.gz"))
            (sha256 (base32
                     "1rd8pap455wzkx19i0sy3cqap524b6fwcjvqynxp6lhm01di4bd6"))))
   (build-system gnu-build-system)


@@ 112,19 113,10 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
    `(("gettext" ,gnu-gettext)
      ("pkg-config" ,pkg-config)))
   (arguments
    `(#:phases
      (alist-replace
       'configure
       (lambda* (#:key inputs #:allow-other-keys #:rest args)
         (let ((vpnc (assoc-ref inputs "vpnc"))
               (configure (assoc-ref %standard-phases 'configure)))
           (apply configure
                  (append args
                          (list '#:configure-flags
                                (list (string-append "--with-vpnc-script="
                                                     vpnc
                                                     "/etc/vpnc/vpnc-script")))))))
       %standard-phases)))
    `(#:configure-flags
      `(,(string-append "--with-vpnc-script="
                        (assoc-ref %build-inputs "vpnc")
                        "/etc/vpnc/vpnc-script"))))
   (synopsis "Client for Cisco VPN")
   (description
    "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is