Content-Security-Policy: default-src 'none'
Content-Type: text/plain; charset=UTF-8
Content-Length: 10347
Content-Disposition: inline; filename="gawk.scm"
Last-Modified: Fri, 20 Sep 2024 07:31:46 GMT
Expires: Mon, 18 Sep 2034 07:31:46 GMT
ETag: "1497030043aa124e997ba5ed72e3b2a084e9b4d3"

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012-2016, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gn</td></tr></table>
<table class='tabs'><tr><td>
<a href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>refs</a><a href='/guix/log/tests/guix-graph.sh'>log</a><a href='/guix/tree/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>tree</a><a class='active' href='/guix/commit/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>commit</a><a href='/guix/diff/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/tests/guix-graph.sh'>
<input type='hidden' name='id' value='78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/commit/?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>root</a>/<a href='/guix/commit/tests?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>tests</a>/<a href='/guix/commit/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>guix-graph.sh</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>ng0 &lt;ng0@no-reply.pragmatique.xyz&gt;</td><td class='right'>2017-05-04 19:45:54 +0000</td></tr>
<tr><th>committer</th><td>Ludovic Courtès &lt;ludo@gnu.org&gt;</td><td class='right'>2017-05-28 23:13:40 +0200</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/guix/commit/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173</a> (<a href='/guix/patch/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/guix/tree/?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>59d09aa18aa208e5941a83b90ff38d835319332a</a> /<a href='/guix/tree/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>tests/guix-graph.sh</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/guix/commit/tests/guix-graph.sh?id=ce676015645949091ceb54f7eb9daede7bc619fc'>ce676015645949091ceb54f7eb9daede7bc619fc</a> (<a href='/guix/diff/tests/guix-graph.sh?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173&amp;id2=ce676015645949091ceb54f7eb9daede7bc619fc'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='oid'><a href='/guix/snapshot/guix-78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173.tar.gz'>guix-78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173.tar.gz</a><br/><a href='/guix/snapshot/guix-78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173.zip'>guix-78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173.zip</a><br/></td></tr></table>
<div class='commit-subject'>gnu: Add spectrwm.</div><div class='commit-msg'>* gnu/packages/wm.scm (spectrwm): New variable.

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</div><div class='diffstat-header'><a href='/guix/diff/?id=78dfc9e2dd3fd10ac3f6a01617b41bb08a80f173'>Diffstat</a> (limited to 'tests/guix-graph.sh')</div><table summary='diffstat' class='diffstat'></table><div class='diffstat-summary'>0 files changed, 0 insertions, 0 deletions</div><table summary='diff' class='diff'><tr><td></td></tr></table></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
uild utils)))
              (snippet
               '(begin
                  ;; Prevent tests from hard coding PATH to a bogus value.
                  (substitute* '("test/mawktest" "test/fpe_test")
                    (("^PATH=.*")
                     ""))))))
    (build-system gnu-build-system)
    (synopsis "Text scanning and processing language")
    (description
     "@command{mawk} is an interpreter for the Awk programming language.
This version aims to be smaller and faster than GNU Awk, at the expense
of fewer features and extensions.")
    (license license:gpl2))) ;version 2 only

(define-public cppawk
  (package
    (name "cppawk")
    (version "20220703")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://www.kylheku.com/git/cppawk")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0b09757q81sz4gn62k3mv5bgllyb2v5m64346s8fc99mqqif70cx"))))
    (build-system copy-build-system)
    (arguments
     `(#:install-plan '(("bin/cppawk" "bin/cppawk")
                        ("share/cppawk/include" "share/cppawk/include")
                        ("./" "share/man/man1" #:include-regexp (".*\\.1$")))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-paths
           (lambda _
             (substitute* "bin/cppawk"
               (("/bin/sh") (which "sh"))
               (("/bin/bash") (which "bash"))
               (("dirname") (which "dirname"))
               (("mktemp") (which "mktemp"))
               ;; Extra space to prevent matching Awk's printf.
               (("printf ") (string-append (which "printf") " "))
               (("rm -f") (string-append (which "rm") " -f"))
               (("prepro=cpp") (string-append "prepro=" (which "cpp")))
               (("sed -e") (string-append (which "sed") " -e")))
             (substitute* '("runtests"
                            "testdir/testawk"
                            "testdir/testcpp"
                            "testdir/testdel")
               (("/bin/sh") (which "sh")))
             (substitute* "testsuite.awk"
               (("/usr/bin/awk") (which "awk")))))
         (add-after 'fix-paths 'fix-awk-paths
           (lambda _
             (substitute* "bin/cppawk"
               (("awk=gawk") (string-append "awk=" (which "gawk")))
               (("awk '") (string-append (which "gawk") " '")))))
         (add-after 'fix-awk-paths 'check
           (lambda _
             (invoke "./runtests"))))))
    (native-inputs
     ;; For tests
     (list mawk))
    (inputs
     (list coreutils                    ; For dirname, mktemp, printf, rm
           gawk-mpfr                    ; Default variant, but supports others
           gcc                          ; For cpp
           sed))
    (home-page "https://www.kylheku.com/cgit/cppawk/")
    (synopsis "Wrapper script that adds C preprocessing to Awk")
    (description
     "@command{cppawk} is a shell script that invokes the C preprocessor
(@command{cpp}) on Awk code and calls Awk (by default GNU Awk) on the result.

@command{cppawk} understands the basic Awk options like @option{-F} and
@option{-v}, and also understands common @command{cpp} options like
@option{-I} and @option{-Dmacro=value}.

@command{cppawk} has no dependencies beyond Awk, @command{cpp}, @command{sed}
and some GNU core utilities (including @command{printf}).  Preprocessed
programs can be captured and transferred to systems that have Awk but not
@command{cpp} or @command{cppawk}.")
    (license license:bsd-2)))

(define-public cppawk-egawk
  (package/inherit cppawk
    (name "cppawk-egawk")
    (arguments
     (substitute-keyword-arguments (package-arguments cppawk)
       ((#:phases phases)
        `(modify-phases ,phases
           (replace 'fix-awk-paths
             (lambda _
               (substitute* "bin/cppawk"
                 (("awk=gawk") (string-append "awk=" (which "egawk")))
                 (("awk '") (string-append (which "egawk") " '")))))))))
    (inputs
     (modify-inputs (package-inputs cppawk)
       (delete "gawk-mpfr")
       (prepend egawk-next)))
    (synopsis "cppawk that calls Enhanced GNU Awk by default")))
