code:
(define-module (python gentlsa)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (gnu packages check)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages tls)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download))

(define-public gentlsa
  (let ((commit "4713ca88cdf328d070252d4b8e61763f66163687")
        (revision "1"))
    (package
      (name "gentlsa")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/ekollof/gentlsa.git")
               (commit commit)))
         (sha256
          (base32
           "0h63i94x4xg12nsw4az9ip6ds4wii7fnb41wapsv5hvv94ylb4p8"))))
      (build-system gnu-build-system)
      (inputs
       `(("python" ,python)
         ("python-dnspython" ,python-dnspython)
         ("python-docopt" ,python-docopt)
         ("python-m2crypto" ,python-m2crypto)))
      (arguments
       `(#:modules ((guix build gnu-build-system)
                    ((guix build python-build-system) #:prefix python:)
                    (guix build utils))
         #:imported-modules (,@%gnu-build-system-modules
                             (guix build python-build-system))
         #:tests? #f
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (delete 'build)
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (bin-dir (string-append out "/bin"))
                      (target (string-append bin-dir "/" "gentlsa")))
                 (mkdir-p bin-dir)
                 (copy-file "gentlsa.py" target)
                 (chmod target #o555)
                 #t)))
           (add-after 'install 'wrap-python
             (assoc-ref python:%standard-phases 'wrap)))))
      (synopsis "Tool for dealing with DANE/TLSA records")
      (description
       "Simple tool for dealing with DANE/TSLA records. Also displays info for certificates. Also has optional CloudFlare support.")
      (home-page "https://github.com/ekollof/gentlsa")
      (license license:bsd-2))))

(define-public python-suds-community
  (package
    (name "python-suds-community")
    (version "0.8.4")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "suds-community" version))
        (sha256
          (base32
            "1xnnadsyvhpcz0rd37vg28zh2l5n5ssvkjf06l97skg45b2c7j85"))))
    (build-system python-build-system)
    (native-inputs
     `(("six" ,python-six)
       ("pytest" ,python-pytest)))
    (home-page
      "https://github.com/suds-community/suds")
    (synopsis
      "Lightweight SOAP client (community fork)")
    (description
      "Lightweight SOAP client (community fork)")
    (license license:lgpl3+)))

(define-public python-transip
  (package
    (name "python-transip")
    (version "2.1.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "transip" version))
       (sha256
        (base32
         "1czpflvmd9iwdq78kcjjb5x02lwhrmrp6jjvbraw9g9zh3lnmip8"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           (substitute* "setup.py"
             (("suds-jurko")
              "suds-community"))
           #t))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
     `(("python-cryptography" ,python-cryptography)
       ("python-requests" ,python-requests)
       ("python-suds-community" ,python-suds-community)))
    (home-page
     "https://github.com/benkonrath/transip-api")
    (synopsis "TransIP API Connector")
    (description "TransIP API Connector")
    (license license:expat)))

python-transip

repo_name: jlicht/guix

license: unknown


code:
(define-module (python gscholar)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system python)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages pdf)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public python-gscholar
  (package
    (name "python-gscholar")
    (version "1.6.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "gscholar" version))
       (sha256
        (base32
         "1d58dvvjlcm1hbw7n2pffyspi4hcinc0mwna444ps7mzd3inslqq"))))
    (build-system python-build-system)
    (native-inputs
     `(("poppler" ,poppler)))
    (home-page "https://github.com/venthur/gscholar")
    (synopsis
     "Python library to query Google Scholar.")
    (description
     "Python library to query Google Scholar.")
    (license license:expat)))

(define-public python-pywal
  (package
    (name "python-pywal")
    (version "3.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pywal" version))
       (sha256
        (base32
         "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'unpack 'fix-paths
                    (lambda* (#:key inputs #:allow-other-keys)
                      (let* ((imagick (assoc-ref inputs "imagemagick"))
                             (convert (string-append imagick "/bin/convert")))
                        (substitute* "pywal/backends/wal.py"
                          (("if shutil\\.which\\(\"magick\"\\):")
                           (string-append  "return [\"" convert "\"]"))
                          (("return \\[\"magick\", \"convert\"\\]")
                           "")))
                      #t)))))
    (home-page "https://github.com/dylanaraps/pywal")
    (inputs
     `(("imagemagick" ,imagemagick)))
    (synopsis
     "Generate and change color-schemes on the fly")
    (description
     "Generate and change color-schemes on the fly")
    (license license:expat)))


code:
(define-module (python localslackirc)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system python)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages time)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public python-typedload
  (package
    (name "python-typedload")
    (version "2.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "typedload" version))
       (sha256
        (base32
         "050yvpaqv00r7lg3341iv90j2vjsj64ifqhphiz68llycmia8gn8"))))
    (build-system python-build-system)
    (home-page "https://github.com/ltworf/typedload")
    (synopsis
     "Load and dump data from json-like format into typed data structures")
    (description
     "Load and dump data from json-like format into typed data structures")
    (license #f)))

(define-public localslackirc
  (package
    (name "localslackirc")
    (version "1.7")
    (source
     (origin
       (method url-fetch)
       (uri "https://github.com/ltworf/localslackirc/releases/download/1.7/localslackirc_1.7.orig.tar.gz")
       (sha256
        (base32
         "14cx0wjz7rqhpx0b6fl89gnp5pr5ncrgbpfl8hzh7fll93c1jkh0"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           (substitute* "Makefile"
             ;; do not leak information about the build host
             (("/usr/")
              "/"))
           #t))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (delete 'build)
         (delete 'check)

         ;; (wrap-program (string-append newbin "/fiologparser_hist.py")
         ;;   `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out")))
               (invoke "make" (string-append "DESTDIR=" out) "install"))
             #t))
         (add-after 'install 'wrap
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
                   (python-path (getenv "PYTHONPATH")))
               (wrap-program (string-append out "/bin/localslackirc")
                 `("PYTHONPATH" ":" prefix (,python-path))))
             #t)))))
    (propagated-inputs
     `(("python-requests" ,python-requests)
       ("python-websocket-client" ,python-websocket-client)
       ("python-typedload" ,python-typedload)))
    (home-page "https://github.com/ltworf/localslackirc")
    (synopsis
     "TODO")
    (description
     "TODO")
    (license #f)))

localslackirc


code:
(define-module (python rotate-backups)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system python)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages time)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public python-pyreadline
  (package
    (name "python-pyreadline")
    (version "2.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pyreadline" version ".zip"))
       (sha256
        (base32
         "1lg255r2qfmaln7dgr3hlb0kg4m07m1n95ppm6qjanz8q8pmjc25"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (native-inputs `(("unzip" ,unzip)))
    (home-page "http://ipython.org/pyreadline.html")
    (synopsis
     "A python implmementation of GNU readline.")
    (description
     "A python implmementation of GNU readline.")
    (license license:bsd-3)))

(define-public python-humanfriendly-next
  (package
    (name "python-humanfriendly")
    (version "7.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "humanfriendly" version))
       (sha256
        (base32
         "0r853k0j8dyqsx0l5sbzsi3f59dsh5rjmas87d0ymp2qzf12np2y"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
     `(("python-monotonic" ,python-monotonic)
       ("python-pyreadline" ,python-pyreadline)))
    (home-page
     "https://humanfriendly.readthedocs.io")
    (synopsis
     "Human friendly output for text interfaces using Python")
    (description
     "Human friendly output for text interfaces using Python")
    (license license:expat)))

(define-public python-coloredlogs-next
  (package
    (name "python-coloredlogs")
    (version "14.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "coloredlogs" version))
       (sha256
        (base32
         "01d564fl88lkqlr888filf9iy7q35lsc823nm70acfh5sa9v3ym1"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
     `(("python-humanfriendly" ,python-humanfriendly-next)
       ("python-verboselogs" ,python-verboselogs)))
    (home-page "https://coloredlogs.readthedocs.io")
    (synopsis
     "Colored terminal output for Python's logging module")
    (description
     "Colored terminal output for Python's logging module")
    (license license:expat)))

(define-public python-update-dotdee
  (package
    (name "python-update-dotdee")
    (version "5.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "update-dotdee" version))
        (sha256
          (base32
            "0cz486hzds8z1wqvn014p1phipvmm53hgl8pmvy2rd9zyslsy5kk"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-executor" ,python-executor)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-naturalsort" ,python-naturalsort)
        ("python-property-manager"
         ,python-property-manager)
        ("python-six" ,python-six)))
    (home-page
      "https://github.com/xolox/python-update-dotdee")
    (synopsis
      "Generic modular configuration file manager")
    (description
      "Generic modular configuration file manager")
    (license #f)))

(define-public python-simpleeval
  (package
    (name "python-simpleeval")
    (version "0.9.10")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "simpleeval" version))
        (sha256
          (base32
            "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
    (build-system python-build-system)
    (home-page
      "https://github.com/danthedeckie/simpleeval")
    (synopsis
      "A simple, safe single expression evaluator library.")
    (description
      "A simple, safe single expression evaluator library.")
    (license #f)))

(define-public python-naturalsort
  (package
    (name "python-naturalsort")
    (version "1.5.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "naturalsort" version))
        (sha256
          (base32
            "0mkk27km6sibxjfmvp39szsphj775z2x3pm2ig020d5swzb5waqp"))))
    (build-system python-build-system)
    (home-page
      "https://github.com/xolox/python-naturalsort")
    (synopsis
      "Simple natural order sorting API for Python")
    (description
      "Simple natural order sorting API for Python")
    (license #f)))

(define-public python-property-manager
  (package
    (name "python-property-manager")
    (version "2.3.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "property-manager" version))
        (sha256
          (base32
            "0bqnhl2lmnhwjisn67c49r3crw6h51lkr91z29sax4anz4qg5q8r"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-humanfriendly" ,python-humanfriendly-next)
        ("python-verboselogs" ,python-verboselogs)))
    (home-page
      "https://property-manager.readthedocs.org")
    (synopsis
      "Useful property variants for Python programming (required properties, writable properties, cached properties, etc)")
    (description
      "Useful property variants for Python programming (required properties, writable properties, cached properties, etc)")
    (license license:expat)))

(define-public python-executor
  (package
    (name "python-executor")
    (version "21.3")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "executor" version))
        (sha256
          (base32
            "1k16lgbg4xhx45x7xw7h43biqlxfsddy4fvn08wjxmc6868lx3ga"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-fasteners" ,python-fasteners)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-property-manager"
         ,python-property-manager)
        ("python-six" ,python-six)))
    (home-page "https://executor.readthedocs.io")
    (synopsis
      "Programmer friendly subprocess wrapper")
    (description
      "Programmer friendly subprocess wrapper")
    (license license:expat)))

(define-public python-rotate-backups
  (package
    (name "python-rotate-backups")
    (version "8.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "rotate-backups" version))
        (sha256
          (base32
            "1vh7zl1q3w19w0vym9s9p4h9ais668xad4nb664r34xn1qnqnikl"))))
    (build-system python-build-system)
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-dateutil" ,python-dateutil)
        ("python-executor" ,python-executor)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-naturalsort" ,python-naturalsort)
        ("python-property-manager"
         ,python-property-manager)
        ("python-simpleeval" ,python-simpleeval)
        ("python-six" ,python-six)
        ("python-update-dotdee" ,python-update-dotdee)
        ("python-verboselogs" ,python-verboselogs)))
    (home-page
      "https://github.com/xolox/python-rotate-backups")
    (synopsis
      "Simple command line interface for backup rotation")
    (description
      "Simple command line interface for backup rotation")
    (license license:expat)))

python-rotate-backups


code:
(define-module (python youtube-local)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system python)
  #:use-module (gnu packages)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-compression)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages xml)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download))

(define-public python-cachetools
  (package
    (name "python-cachetools")
    (version "4.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "cachetools" version))
       (sha256
        (base32
         "086vkqy084rd0xlfnyyylwr2vp8qrz806aywy9fif06yvv1kkamv"))))
    (build-system python-build-system)
    (home-page "https://github.com/tkem/cachetools/")
    (synopsis
     "Extensible memoizing collections and decorators")
    (description
     "Extensible memoizing collections and decorators")
    (license license:expat)))

(define-public youtube-local
  (package
    (name "youtube-local")
    (version "2.3.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/user234683/youtube-local.git")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "19ynbszn7mm7w7p48xmg372y4n4gq3q4krli0fixqkvabzc5n987"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  (substitute* "server.py"
                    (("from gevent import monkey")
                     "#!/usr/bin/env python3\nfrom gevent import monkey"))))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (delete 'build)
         (delete 'check)
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((source (assoc-ref %build-inputs "source"))
                    (out (assoc-ref outputs "out"))
                    (bin (string-append out "/bin"))
                    (target (string-append bin "/youtube-local-server"))
                    (share (string-append out "/share"))
                    (yt (string-append out "/share/youtube")))
               (mkdir-p yt)
               (copy-recursively "youtube" yt)
               (install-file "settings.py" share)
               (mkdir-p bin)
               (copy-file "server.py" target)
               (chmod target #o555)
               (with-directory-excursion bin
                 (setenv "PYTHONPATH"
                         (string-append share
                                        ":"
                                        (getenv "PYTHONPATH")))
                 (wrap-program target
                   `("PYTHONPATH" = (,(getenv "PYTHONPATH")))))
               #t))))))
    (inputs
     `(("python" ,python)
       ("python-brotli" ,python-brotli)
       ("python-gevent" ,python-gevent)
       ("python-flask" ,python-flask)
       ("python-pysocks" ,python-pysocks)
       ("python-urllib3" ,python-urllib3)
       ("python-defusedxml" ,python-defusedxml)
       ("python-cachetools" ,python-cachetools)))
    (home-page "https://github.com/user234683/youtube-local")
    (synopsis "Browser-based client for watching Youtube")
    (description "youtube-local is a browser-based client written in
Python for watching Youtube anonymously and without the lag of the
slow page used by Youtube.")
    (license license:agpl3)))

youtube-local


code:
(define-module (staging bluez)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages linux))

(define-public bluez-compat
  (package
    (inherit bluez)
    (name "bluez-compat")
    (arguments
     (substitute-keyword-arguments (package-arguments bluez)
       ((#:configure-flags configure-flags)
        `(cons "--enable-deprecated" ,configure-flags))))))

bluez-compat


code:
(define-module (staging cbr-to-epub)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix download)
  #:use-module (guix build-system ruby))

(define-public ruby-cbr-to-epub
  (package
    (name "ruby-cbr-to-epub")
    (version "1.0.0")
    (source
     (origin
       (method url-fetch)
       (uri (rubygems-uri "cbr_to_epub" version))
       (sha256
        (base32
         "1xl79bnwgrvwasjiga5hyv5vssh8a3gxsqhsdwg116h81wlvkjwa"))))
    (build-system ruby-build-system)
    (arguments
     `(#:tests? #f))
    (synopsis
     "A simple gem for converting cbr files to epub")
    (description
     "This package provides a simple gem for converting cbr files to epub")
    (home-page
     "https://rubygems.org/gems/cbr_to_epub")
    (license license:expat)))


code:
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;;
;;; This file is NOT part of GNU Guix.
;;;
;;; This file 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.
;;;
;;; This file 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 This file.  If not, see <http://www.gnu.org/licenses/>.

(define-module (staging cquery)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (gnu packages llvm)
  #:use-module (guix build-system cmake))

(define-public cquery
  (let* ((commit "70c755b2e390d3edfb594a84a7531beb26b2bc07")
	 (revision "2")
	 (version (git-version "2018.07.18" revision commit)))
    (package
     (name "cquery")
     (version version)
     (home-page "https://github.com/cquery-project/cquery")
     (source (origin
	      (method git-fetch)
	      (uri (git-reference
                    (url home-page)
                    (commit commit)
		    (recursive? #t)))
	      (sha256
               (base32
		"15hndagk8szyxd34fp3z753i4vqb37p2b835a1k7pjff0hgdmg75"))
	      (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
	'("-DSYSTEM_CLANG=ON")
	#:tests? #f))
     (inputs
      `(("clang" ,clang)))
     (synopsis "C/C++ language server supporting multi-million line code base,
powered by libclang.")
     (description "cquery is a highly-scalable, low-latency language server for
C/C++/Objective-C. It is tested and designed for large code bases like
Chromium. cquery provides accurate and fast semantic analysis without
interrupting workflow.")
     (license license:expat))))

cquery


code:
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Jelle Licht <jlicht@fsfe.org>
;;;
;;; This file is not 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.gnu.org/licenses/>.

(define-module (staging docker-download)
  #:use-module (guix derivations)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix modules)
  #:use-module (guix monads)
  #:use-module (guix packages)
  #:use-module (guix profiles)
  #:use-module (guix store)
  #:use-module (gnu packages virtualization)
  #:use-module (ice-9 match)
  #:export (docker-fetch))

(define-public skopeo-next
  (package
    (inherit skopeo)
    (name "skopeo")
    (version "1.1.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/projectatomic/skopeo")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1cxhwfrp5cjdq56vzy7gmidvm1z02f0rz2r1lv0d9ymnjlsjp9s3"))))))

(define* (docker-fetch url hash-algo hash
                       #:optional name
                       #:key (system (%current-system)) (guile (default-guile))
                       (skopeo skopeo-next))
  "Return a fixed-output derivation that fetches URL, which should use the
`docker://' protocol scheme as understood by skopeo.  The output
is expected to HASH of type HASH-ALGO (a symbol).  Use NAME as the file name,
or a generic name if #f."
  (define modules
    (source-module-closure '((guix build utils))))

  (define (build)
    (with-imported-modules modules
      #~(begin
          (use-modules (guix build utils))
          (let ((skopeo (string-append #+skopeo "/bin/skopeo")))
            (invoke skopeo
                    "--insecure-policy"
                    (string-append "--tmpdir=" (getenv "TMPDIR"))
                    "copy"
                    "--src-tls-verify=false"
                    #+url
                    (string-append "docker-archive://"#$output))))))
  (mlet %store-monad
      ((guile (package->derivation guile system)))
    (gexp->derivation (or name "docker-download") (build)
                      #:script-name "docker-download"
                      #:system system
                      #:hash-algo hash-algo
                      #:hash hash
                      #:guile-for-build guile)))

(define ubuntu-test
  (origin
    (method docker-fetch)
    (uri "docker://ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2")
    (file-name "ubuntu-img.tgz")
    (sha256
     (base32
      "0ccvs2zkz12azjvxwmxcccwc4krbnbjsr9kj521mx8n32z0zd0dn"))))

ubuntu-test


code:
(define-module (staging fortivpn)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix git-download)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages samba)
  #:use-module (gnu packages tls)
  #:use-module (guix utils))

(define-public openfortivpn
  (package
    (name "openfortivpn")
    (version "1.14.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/adrienverge/openfortivpn.git")
                    (commit (string-append "v" version))))
              (sha256
               (base32
                "1r9lp19fmqx9dw33j5967ydijbnacmr80mqnhbbxyqiw4k5c10ds"))))
    (build-system gnu-build-system)
    (inputs `(("openssl" ,openssl)
              ("ppp" ,ppp)))
    (native-inputs `(("pkg-config" ,pkg-config)
                     ("autoconf" ,autoconf-wrapper)
                     ("automake" ,automake)))
    (home-page "https://github.com/adrienverge/openfortivpn")
    (synopsis "openfortivpn client")
    (description "openfortivpn client")
    (license #f)))

openfortivpn


code:
(define-module (staging intel-vaapi-g45)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (gnu packages autotools )
  #:use-module (gnu packages video))

(define-public intel-vaapi-driver-g45-h264
  (let ((base intel-vaapi-driver)
        (commit "4b04c0391420cc53dc20b9da83e1c168537c4d72")
        (revision "1"))
    (package/inherit
      base
      (name "intel-vaapi-driver-g45-h264")
      (version (git-version "2.4.1" revision commit))
      (version (package-version base))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.sr.ht/~jlicht/intel-vaapi-driver-g45")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0cj4s42j5jd956jzncvc8zx5p2z3zyidim9h492r24bvsnyizg5f")))))))

intel-vaapi-driver-g45-h264


code:
(define-module (staging jsonnet)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix git-download)
  #:use-module (guix utils))

(define-public jsonnet
  (package
    (name "jsonnet")
    (version "0.15.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/google/jsonnet.git")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "06imnpbc5mn1dis051f54q6nq80dbm51nhxmba61rdyhf1131ml8"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  (replace 'install
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-dir (string-append out "/bin")))
                        (mkdir-p bin-dir)
                        (install-file "jsonnet" bin-dir)
                        #t))))))
    (native-search-paths
     (list (search-path-specification
            (variable "JSONNET_PATH")
            (files '("lib/jsonnet")))))
    (home-page "https://jsonnet.org/")
    (synopsis "Data templating language")
    (description
     "jsonnet is a data templating language for app and tool
developers. It extends the JavaScript Object Notation (JSON) with
variables, conditionals and functions.")
    (license license:asl2.0)))

(define-public grafonnet
  (let ((commit "c459106d2d2b583dd3a83f6c75eb52abee3af764")
        (revision "1"))
    (package
      (name "grafonnet")
      (version (git-version "0.0.1" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/grafana/grafonnet-lib.git")
                      (commit commit)))
                (sha256
                 (base32
                  "0xl7n9r5vmpb5302f3k8kw1npvq9dzg6d3n96rkm07rlxbs6ga0c"))))
      (build-system trivial-build-system)
      (arguments
       `(#:builder (begin
                     (use-modules (guix build utils))
                     (let* ((libname "grafonnet")
                            (source (assoc-ref %build-inputs "source"))
                            (out    (assoc-ref %outputs "out"))
                            (libdir (string-append out "/lib/jsonnet"))
                            (src (string-append source "/" libname))
                            (target (string-append libdir "/" libname)))
                       (copy-recursively src target)
                       #t))
         #:modules ((guix build utils))))
      (home-page "https://github.com/grafana/grafonnet-lib")
      (synopsis "Jsonnet library for generating Grafana dashboard files")
      (description
       "Grafonnet provides a simple way of writing Grafana
dashboards. It leverages the data templating language Jsonnet. It
enables you to write reusable components that you can use and reuse
for multiple dashboards.")
      (license license:asl2.0))))


code:
(define-module (staging libravatar)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (gnu packages base)
  #:use-module (gnu packages crypto)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages pkg-config)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  )

;; (define-public bmake
;;   (package
;;     (name "bmake")
;;     (version "20200524")
;;     (source (origin
;;               (method url-fetch)
;;               (uri (string-append "http://www.crufty.net/ftp/pub/sjg/bmake-" version ".tar.gz"))
;;               (sha256
;;                (base32
;;                 "1nyscqwlxdm2qppivp73r04j31gvhw9achb0ivy2rbbxnjx2prvr"))

;;               (patches (list "./bootstrap-fix.patch"
;;                              "./fix-unexport-env-test.patch"))))
;;     (build-system gnu-build-system)
;;     (arguments
;;      `(#:tests? #f
;;        #:make-flags
;;        (let ((bash (assoc-ref %build-inputs "bash")))
;;          (list (string-append "SHELL=" bash "/bin/bash")))

;;        ;; #:phases (modify-phases %standard-phases
;;        ;;            (replace 'configure
;;        ;;              (lambda* (#:key (configure-flags '()) #:allow-other-keys)
;;        ;;                (let ((bash (which "bash")))
;;        ;;                  (setenv "SHELL" bash)
;;        ;;                  (setenv "CONFIG_SHELL" bash)
;;        ;;                  (apply invoke "sh" "boot-strap" configure-flags))))
;;        ;;            (delete 'build))
;;        ;; #:phases (modify-phases %standard-phases
;;        ;;            (replace 'build
;;        ;;              (lambda _
;;        ;;                (invoke "sh"
;;        ;;                        "make-bootstrap.sh")))
;;        ;;            ;; (add-after 'install 'install-plugin-headers
;;        ;;            ;;   (lambda* (#:key outputs #:allow-other-keys)
;;        ;;            ;;     (let* ((out (assoc-ref outputs "out"))
;;        ;;            ;;            (include-dir (string-append out "/include"))
;;        ;;            ;;            (install-include (cut install-file <> include-dir)))
;;        ;;            ;;       (mkdir-p include-dir)
;;        ;;            ;;       (for-each install-include
;;        ;;            ;;                 (find-files "standalone" "\\.h$"))
;;        ;;            ;;       (for-each install-include
;;        ;;            ;;                 (find-files "apache2" "\\.h$")))))
;;        ;;            )
;;        ))
;;     (native-inputs
;;      `(("sed" ,sed)
;;        ("coreutils" ,coreutils)))
;;     (home-page "http://www.crufty.net/help/sjg/bmake.html")
;;     (synopsis "Portable version of NetBSD @code{make}")
;;     (description "Portable version of NetBSD @code{make}")
;;     (license license:bsd-3)))

(define-public identiconpp
  (package
    (name "identiconpp")
    (version "0.7.1")
    (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://schlomp.space/tastytea/identiconpp.git")
           (commit version)))
     (file-name (git-file-name name version))
     (sha256
      (base32
       "12c4yl92kk4ck9gd0qg4ywk0kk77gcxrw44rznyn91lj3win9xfa"))))
    (build-system cmake-build-system)
    (arguments
     '(#:tests? #f))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (inputs
     `(("imagemagick" ,imagemagick)))
    (home-page "https://schlomp.space/tastytea/identiconpp")
    (synopsis "Generate identicons for C++")
    (description "identiconpp is a library to generate identicons for
C++.")
    (license license:gpl3)))

(define-public libravatarserv
  (package
    (name "libravatarserv")
    (version "0.7.2")
    (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://schlomp.space/tastytea/libravatarserv.git")
           (commit version)))
     (file-name (git-file-name name version))
     (sha256
      (base32
       "0jwpwia5i8m8h0cbkwj143fbk1954qwpk675rxrki9sra0vp9rsq"))))
    (build-system cmake-build-system)
    (arguments
     '(#:tests? #f))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (inputs
     `(("imagemagick" ,imagemagick)
       ("crypto++" ,crypto++)
       ("libxdg-basedir" ,libxdg-basedir)
       ("identiconpp" ,identiconpp)))
    (home-page "https://schlomp.space/tastytea/libravatarserv")
    (synopsis "Simple libravatar server")
    (description "libravatarserv is a simple libravatar server. It is
intended to be used as a CGI program. It is a free service and an open
specification for hosting profile images tied to email or OpenID
addresses.")
    (license license:gpl3)))

libravatarserv


code:
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2017 Andy Wingo <wingo@igalia.com>
;;;
;;; This file is NOT 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.gnu.org/licenses/>.

(define-module (staging linux-nonfree)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages tls)
  #:use-module (guix build-system trivial)
  #:use-module (guix build-system linux-module)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public (rtl8812au-module kernel)
  (let ((commit "9f09c7627bda0ab5a577c1ad0337666ca2951132")
        (revision "1"))
    (package
      (name "rtl8812au-module")
      (version (git-version "4.3.14" revision commit))
      (source (origin
                (method git-fetch)
                (uri
                 (git-reference
                  (url "https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git")
                  (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "16wvgq6pq24i5skn87kan9xfyyhg6w62c3wp54dz0v0si4c8k0gw"))))
      (build-system linux-module-build-system)
      (arguments
       `(#:tests? #f
         #:linux ,kernel))
      (home-page "wtf")
      (synopsis "wut")
      (description "wut")
      (license license:gpl2))))

(define-public (tuxedo-keyboard-module kernel)
  (package
    (name "tuxedo-keyboard-module")
    (version "2.0.2")
    (source (origin
              (method git-fetch)
              (uri
               (git-reference
                (url "https://github.com/tuxedocomputers/tuxedo-keyboard.git")
                (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1qgjbqs9b2agm4aabidhxplwi7x1km554k3wr68fb5n8y0bb7rbm"))))
    (build-system linux-module-build-system)
    (arguments
     `(#:tests? #f
       #:linux ,kernel))
    (home-page "https://github.com/tuxedocomputers/tuxedo-keyboard")
    (synopsis "Tuxedo computers kernel module for keyboard
backlighting")
    (description "Tuxedo computer kernel module for keyboard
backlighting.")
    (license license:gpl2)))


code:
(define-module (staging mariadb)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix download)
  #:use-module (gnu packages)
  #:use-module (gnu packages databases))

(define-public mariadb-next
  (package/inherit mariadb
    (version "10.4.13")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://downloads.mariadb.com/MariaDB"
                                  "/mariadb-" version "/source/mariadb-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1pwibmm52sc04qxp832pc3ylxw9wq90fjc7nxpcyp3yys49bpfs5"))
              ;; (patches (search-patches "mariadb-client-test-32bit.patch"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  ;; Delete bundled snappy and xz.
                  (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
                  (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
                    ;; This file checks that the bundled sources are present and
                    ;; declares build procedures for them.
                    (("^include\\(TokuThirdParty\\)") ""))
                  (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
                    ;; Don't attempt to use the procedures we just removed.
                    ((" build_lzma build_snappy") ""))

                  ;; Preserve CMakeLists.txt for these.
                  (for-each (lambda (file)
                              (unless (string-suffix? "CMakeLists.txt" file)
                                (delete-file file)))
                            (append (find-files "extra/yassl")
                                    (find-files "pcre") (find-files "zlib")))
                  #t))))
    (arguments
     (substitute-keyword-arguments (package-arguments mariadb)
       ((#:phases phases)
        `(modify-phases ,phases
           (replace 'adjust-tests
             (lambda _
             (let ((disabled-tests
                    '(;; These fail because root@hostname == root@localhost in
                      ;; the build environment, causing a user count mismatch.
                      ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
                      "main.join_cache"
                      "main.explain_non_select"
                      "main.stat_tables"
                      "main.stat_tables_innodb"
                      "roles.acl_statistics"

                      ;; This file contains a time bomb which makes it fail after
                      ;; 2030-12-31.  See <https://bugs.gnu.org/34351> for details.
                      "main.mysqldump"

                      ;; FIXME: This test fails on i686:
                      ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
                      ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
                      ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
                      ;; (all three tables must exist and be identical)
                      ;; in a loop it produces the same error around 1/240 times.
                      ;; montywi on #maria suggested removing the real_end check in
                      ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
                      ;; reach the ending quote occasionally.  Disable it for now.
                      "main.myisampack"
                      ;; FIXME: This test fails on armhf-linux:
                      "mroonga/storage.index_read_multiple_double"
                      ;; New errors for 10.4.13
                      "rpl.rpl_ip_mix"
                      "rpl.rpl_ip_mix2"
                      "rpl.rpl_ipv6"
                      "main.ipv4_as_ipv6"
                      "main.information_schema"
                      "funcs_1.is_columns_mysql"
                      "main.information_schema"
                      "main.system_mysql_db"))

                   ;; This file contains a list of known-flaky tests for this
                   ;; release.  Append our own items.
                   (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
               (for-each (lambda (test)
                           (format unstable-tests "~a : ~a\n"
                                   test "Disabled in Guix"))
                         disabled-tests)
               (close-port unstable-tests)

               (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
                 (("/bin/bash")
                  (which "bash")))

               (substitute* "mysql-test/mysql-test-run.pl"
                 (("/bin/ls") (which "ls"))
                 (("/bin/sh") (which "sh")))
               #t)))))))))

mariadb-next


code:
(define-module (staging modsec)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (gnu packages apr)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages web)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages libevent)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages xml)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial))

(define-public gnulib
  (let ((commit "de255f87357354e0f2422d9321fe9701b776ead5")
        (revision "1"))
    (package
      (name "gnulib")
      (version "0.0.0")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/gnulib.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "00zjjldhj8ckr47fkqmb4d0lkpn6awwi8k8pngkfn2g30ccz7hji"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f
         #:phases (modify-phases %standard-phases
                    (delete 'configure)
                    (delete 'build)
                    (add-after 'install 'patch-yet-again
                      (lambda* (#:key outputs #:allow-other-keys)
                        (for-each patch-shebang (find-files (assoc-ref outputs "out")))
                        #t))
                    (replace 'install
                      (lambda* (#:key inputs outputs #:allow-other-keys)
                        (let ((source (assoc-ref inputs "source"))
                              (out (assoc-ref outputs "out")))
                          (copy-recursively source out)
                          #t))))))
      (home-page "https://www.gnu.org/software/gnulib/")
      (synopsis "")
      (description "")
      ;; TODO: omg wtf
      (license #f))))

(define-public pax-utils
  (package
    (name "pax-utils")
    (version "1.2.4")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "http://distfiles.gentoo.org/distfiles/pax-utils-"
                    version ".tar.xz"))
              (sha256
               (base32
                "01kr6l2c3bhbgdrmwgzh6jk0jjkw3pi9xrzzl9cpn0ibyf68p1aj"))))
    (build-system gnu-build-system)
    (home-page "https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities")
    (synopsis "ELF utils that can check files for security relevant properties")
    (description "A suite of ELF tools to aid auditing systems.
Contains various ELF related utils for ELF32, ELF64 binaries useful
for displaying PaX and security info on a large groups of binary
files.")
    (license license:gpl2+)))

(define-public vtest
  (let ((commit "86e65f1024453b1074d239a88330b5150d3e44bb")
        (revision "1"))
    (package
      (name "vtest")
      (version (git-version "0.0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/vtest/VTest.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "13z2j7gnbivzapp3rdf0pjk33rw8kw6rich4aidsi9kr3rc0f3g9"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f
         #:make-flags (list "CC=gcc")
         #:phases (modify-phases %standard-phases
                    (delete 'configure)
                    (replace 'install
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((out (assoc-ref outputs "out"))
                               (bin-dir (string-append out "/bin")))
                          (mkdir-p bin-dir)
                          (install-file "vtest" bin-dir)
                          #t))))))
      (inputs
       `(("zlib" ,zlib)
         ("pcre" ,pcre)))
      (native-inputs `(("python" ,python-minimal)))
      (home-page "https://github.com/vtest/VTest")
      (synopsis "HTTP test-program")
      (description "VTest is the (almost) unvarnished varnishtest
program, made available as a stand-alone program because it can be
used to test all sorts of HTTP clients, servers and proxies.")
      (license (list license:bsd-2 license:bsd-3)))))

(define-public haproxy
  (package
    (name "haproxy")
    (version "2.0.7")
    (source (origin
              (method url-fetch)
              (uri
               (string-append "https://www.haproxy.org/download/"
                              (version-major+minor version)
                              "/src/haproxy-" version ".tar.gz"))
              (sha256
               (base32
                "1p0kn7f6gq4n9hik8bq9hckfj816m40lw5yx0qjvvlcf09rcswrq"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:make-flags
       (list "TARGET=linux-glibc"
             "USE_OPENSSL=yes"
             "USE_PCRE=yes"
             "USE_PCRE_JIT=yes"
             "USE_ZLIB=yes"
             (string-append "PREFIX=" (assoc-ref %outputs "out")))

       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  ;; TODO: package "VTest" from https://github.com/vtest/VTest
                  ;; (replace 'check
                  ;;   (lambda _
                  ;;     (invoke "scripts/run-regtests.sh")))
                  )))
    (inputs
     `(("zlib" ,zlib)
       ("openssl" ,openssl)
       ("pcre:bin" ,pcre "bin")
       ("gettext" ,gnu-gettext)))
    (native-inputs `(("python" ,python)))
    (home-page "https://www.haproxy.org/")
    (synopsis "High performance tcp/http load balancer")
    (description "High performance tcp/http load balancer.")
    (license (list license:gpl2+ license:lgpl2.1+))))

(define-public modsecurity-standalone
  (package
    (name "modsecurity-standalone")
    (version "2.9.3")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.modsecurity.org/tarball/" version
                                  "/modsecurity-" version ".tar.gz"))
              (sha256
               (base32
                "0611nskd2y6yagrciqafxdn4rxbdk2v4swf45kc1sgwx2sfh34j1"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list (string-append "--with-curl=" (assoc-ref %build-inputs "curl"))
             (string-append "--with-apxs=" (assoc-ref %build-inputs "httpd") "/bin/apxs")
             (string-append "--with-pcre=" (assoc-ref %build-inputs "pcre:bin") "/bin/pcre-config")
             (string-append "--with-apr=" (assoc-ref %build-inputs "apr"))
             (string-append "--with-apu=" (assoc-ref %build-inputs "apr-util"))
             (string-append "--with-libxml=" (assoc-ref %build-inputs "libxml2"))
             "--disable-apache2-module"
             "--enable-standalone-module"
             "--enable-pcre-study"
             "--without-lua"
             "--enable-pcre-jit")
       #:modules ((srfi srfi-26)
                  ,@%gnu-build-system-modules)
       #:phases (modify-phases %standard-phases
                  (replace 'build
                    (lambda _
                      (invoke "make"
                              "standalone")))
                  (add-after 'install 'install-plugin-headers
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (include-dir (string-append out "/include"))
                             (install-include (cut install-file <> include-dir)))
                        (mkdir-p include-dir)
                        (for-each install-include
                                  (find-files "standalone" "\\.h$"))
                        (for-each install-include
                                  (find-files "apache2" "\\.h$"))))))))
    (inputs
     `(("apr" ,apr)
       ("apr-util" ,apr-util)
       ("curl" ,curl)
       ("httpd" ,httpd)
       ("pcre" ,pcre)
       ("libxml2" ,libxml2)
       ("libyajl" ,libyajl)
       ("pcre:bin" ,pcre "bin")))
    (native-inputs
     `(("perl" ,perl)
       ("pkg-config" ,pkg-config)))
    (home-page "https://www.modsecurity.org")
    (synopsis "Web application firewall")
    (description "ModSecurity is an open source, cross-platform web
application firewall (WAF) module.  Known as the \"Swiss Army Knife\"
of WAFs, it enables web application defenders to gain visibility into
HTTP(S) traffic and provides a power rules language and API to
implement advanced protections.")
    (license license:asl2.0)))

(define-public apr-union
  (package
    (name "apr-union")
    (version (package-version apr))
    (source #f)
    (build-system trivial-build-system)
    (arguments
     '(#:modules ((guix build union))
       #:builder (begin
                   (use-modules (ice-9 match)
                                (guix build union))
                   (match %build-inputs
                     (((names . directories) ...)
                      (union-build (assoc-ref %outputs "out")
                                   directories)
                      #t)))))
    (inputs `(("apr" ,apr)
              ("apr-util" ,apr-util)))
    (synopsis "Union of APR libraries")
    (description
     "A union of APR and its extension utilities.  A union is required
because haproxy SPOA builds assume that all of the headers and
libraries are in the same directory.")
    (home-page (package-home-page apr))
    (license (package-license apr))))

(define-public haproxy-modsecurity
  (package
    (inherit haproxy)
    (name "haproxy-modsecurity")
    (arguments
     `(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  (replace 'build
                    (lambda* (#:key inputs #:allow-other-keys)
                      (let* ((modsecurity (assoc-ref inputs "modsecurity"))
                             (modsec-includes (string-append modsecurity "/include"))
                             (modsec-lib (string-append modsecurity "/lib"))
                             (httpd (assoc-ref inputs "httpd"))
                             (httpd-includes (string-append httpd "/include"))
                             (apr (assoc-ref inputs "apr-union"))
                             (apr-includes (string-append apr "/include/apr-1"))
                             (libxml (assoc-ref inputs "libxml2"))
                             (libxml-includes (string-append libxml "/include/libxml2"))
                             (libevent (assoc-ref inputs "libevent"))
                             (libevent-includes (string-append libevent "/include")))
                        (invoke "make" "-C" "contrib/modsecurity" "CC=gcc"
                                (string-append "MODSEC_INC=" modsec-includes)
                                (string-append "MODSEC_LIB=" modsec-lib)
                                (string-append "APACHE2_INC=" httpd-includes)
                                (string-append "APR_INC=" apr-includes)
                                (string-append "LIBXML_INC=" libxml-includes)
                                (string-append "EVENT_INC=" libevent-includes))
                        #t)))
                  (replace 'install
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-dir (string-append out "/bin")))
                        (mkdir-p bin-dir)
                        (install-file "contrib/modsecurity/modsecurity" bin-dir)
                        #t))))))
    (inputs
     `(("modsecurity" ,modsecurity-standalone)
       ("apr-union" ,apr-union)
       ("httpd" ,httpd)
       ("libevent" ,libevent)
       ("libyajl" ,libyajl)
       ("curl" ,curl)
       ("pcre" ,pcre )
       ("libxml2" ,libxml2)))))


code:
(define-module (staging openriichi)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build-system meson)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages gnome))

(define-public openriichi
  (package
    (name "openriichi")
    (version "0.2.1.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/FluffyStuff/OpenRiichi.git")
             (commit (string-append "v" version))
             (recursive? #t)))
       (sha256
        (base32
         "1x6m4mli92chns5dky9aq9w4r4pnycvlpa2q0giydapm5q9fkslf"))))
    (build-system meson-build-system)
    (arguments
     '(#:glib-or-gtk? #t))
    (inputs
     `(("gtk+" ,gtk+)
       ("libgee" ,libgee)
       ("sdl-image" ,sdl2-image)
       ("sdl-mixer" ,sdl2-mixer)
       ("sdl" ,sdl2)
       ("glew" ,glew)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("vala" ,vala)))
    (synopsis "Japanese Mahjong client")
    (description
     "OpenRiichi is cross platform, and supports singleplayer and
multiplayer, with or without bots. It features all the standard riichi
rules, as well as some optional ones. It also supports game logging,
so games can be viewed again.")
    (home-page "https://github.com/FluffyStuff/OpenRiichi")
    (license license:gpl3+)))

openriichi


code:
(define-module (staging runcache)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix git-download)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages gawk)
  #:use-module (guix build-system trivial))

(define-public runcache
  (package
    (name "runcache")
    (version "0.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/moul/runcache.git")
                    (commit "4bd818facaabc964f812e324281175e11b427c85")))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0pch8znlhf4zah9xfx07r0kqr78rx7gvcfn05vk8sy1cq7ami0jx"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let* ((runcache-script (string-append (assoc-ref %build-inputs "source")
                                                          "/runcache"))
                          (bin-dir (string-append %output "/bin/"))
                          (target-script (string-append bin-dir "/runcache"))
                          (awk (string-append (assoc-ref %build-inputs "gawk")
                                              "/bin/awk"))
                          (which (string-append (assoc-ref %build-inputs "which")
                                                "/bin/which"))
                          (md5sum (string-append (assoc-ref %build-inputs "coreutils")
                                                 "/bin/md5sum"))
                          (bash (string-append (assoc-ref %build-inputs "bash")
                                               "/bin/bash")))
                     (mkdir-p bin-dir)
                     (copy-file runcache-script target-script)
                     (chmod target-script #o755)
                     (substitute* target-script
                       (("/bin/bash") bash)
                       (("awk") awk)
                       (("which") which)
                       (("md5sum") md5sum))
                     #t))))
    (inputs
     `(("bash" ,bash)
       ("coreutils" ,coreutils)
       ("gawk" ,gawk)
       ("which" ,which)))
    (home-page "https://github.com/moul/runcache")
    (synopsis "Shell command caching")
    (description "runcache provides ccache-style caching for unix commands.")
    (license license:expat)))


code:
(define-module (staging snort)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages libedit)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages mpi)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages check)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake))

(define-public libdnet
  (let ((commit "56b9635781571ccc87ab6fc74ba334c3fbd755db")
        (revision "1"))
    (package
      (name "libdnet")
      (version (git-version "1.12" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/ofalk/libdnet.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0hyiw8x21xnz5hkpxkrd2cbpnb16awi5bcijshxdslm5f279a3dq"))))
      (build-system gnu-build-system)
      (home-page "https://github.com/dugsong/libdnet")
      (synopsis "Portable interface to low-level networking routines")
      (description
       "libdnet provides a simplified, portable interface to several
low-level networking routines, including network address manipulation,
kernel arp(4) cache and route(4) table lookup and manipulation,
network firewalling, network interface lookup and manipulation, IP
tunnelling, and raw IP packet and Ethernet frame transmission.")
      (license license:bsd-3))))

(define-public libdaq
  (package
    (name "libdaq")
    (version "2.0.6")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.snort.org/downloads/snort/daq-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1w1s4zchr8zr9vvmnld3q57fxrr50n68dp97d5708riyg7vsa7fl"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list
        (string-append "--with-libpcap-includes=" (assoc-ref %build-inputs "libpcap") "/include")
        (string-append "--with-libpcap-libraries=" (assoc-ref %build-inputs "libpcap") "/lib"))))
    (inputs
     `(("bison" ,bison)
       ("flex" ,flex)
       ("libpcap" ,libpcap)))
    (home-page "https://www.snort.org/")
    (synopsis "Data Acquisition library for packet I/O")
    (description "The DAQ replaces direct calls to libpcap functions
with an abstraction layer that facilitates operation on a variety of
hardware and software interfaces without requiring changes to Snort.
It is possible to select the DAQ type and mode when invoking Snort to
perform pcap readback or inline operation, etc.  The DAQ library may
be useful for other packet processing applications and the modular
nature allows you to build new modules for other platforms.")
    (license license:gpl2+)))

(define-public snort3-libdaq
  (package
    (inherit libdaq)
    (name "snort3-libdaq")
    (version "3.0.0-alpha2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/snort3/libdaq.git")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "08xb9s2pha88d1pwr8vssmzxsxb278id598mrlyq2gdk95wglib6"))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("cmocka" ,cmocka)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)))
    (home-page "https://github.com/snort3/libdaq")))

(define-public snort
  (package
    (name "snort")
    (version "2.9.14.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.snort.org/downloads/snort/snort-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "0bc23r4a44r131jjs9qya46crrgqd371x4x53q6h1kmalffrhwi4"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list
        (string-append "--with-dnet-includes=" (assoc-ref %build-inputs "libdnet") "/include")
        (string-append "--with-dnet-libraries=" (assoc-ref %build-inputs "libdnet") "/lib")
        (string-append "--with-libpcap-includes=" (assoc-ref %build-inputs "libpcap") "/include")
        (string-append "--with-libpcap-libraries=" (assoc-ref %build-inputs "libpcap") "/lib"))))
    (inputs
     `(("libdaq" ,libdaq)
       ("pcre" ,pcre)
       ("libpcap" ,libpcap)
       ("libdnet" ,libdnet)))
    (home-page "https://www.snort.org/")
    (synopsis "Data Acquisition library for packet I/O")
    (description "The DAQ replaces direct calls to libpcap functions
with an abstraction layer that facilitates operation on a variety of
hardware and software interfaces without requiring changes to Snort.
It is possible to select the DAQ type and mode when invoking Snort to
perform pcap readback or inline operation, etc.  The DAQ library may
be useful for other packet processing applications and the modular
nature allows you to build new modules for other platforms.")
    (license license:gpl2+)))

(define-public snort3
  (package
    (inherit snort)
    (name "snort3")
    (version "3.0.0-261")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/snort3/snort3.git")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0dslz7lfyblhch5vrp7w3pydmgwcgdvjh746adlzxb2knc8n9jrx"))))
    (build-system cmake-build-system)
    (arguments '(#:tests? #f))
    (inputs
     `(("hwloc:lib" ,hwloc "lib")
       ("pcre" ,pcre)
       ("libdaq" ,snort3-libdaq)
       ("libpcap" ,libpcap)
       ("libdnet" ,libdnet)
       ("luajit" ,luajit)
       ("openssl" ,openssl)
       ("zlib" ,zlib)))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (home-page "https://github.com/snort3/snort3")))


code:
(define-module (staging tex)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix svn-download)
  #:use-module (guix utils)
  #:use-module (guix build-system texlive)
  #:use-module (guix build-system trivial)
  #:use-module (gnu packages tex))

(define* (simple-texlive-package name locations hash
                                 #:key trivial?)
  "Return a template for a simple TeX Live package with the given NAME,
downloading from a list of LOCATIONS in the TeX Live repository, and
expecting the provided output HASH.  If TRIVIAL? is provided, all
files will simply be copied to their outputs; otherwise the
TEXLIVE-BUILD-SYSTEM is used."
  (define with-documentation?
    (and trivial?
         (any (lambda (location)
                (string-prefix? "/doc" location))
              locations)))
  (package
    (name name)
    (version (number->string %texlive-revision))
    (source (texlive-origin name version
                            locations hash))
    (outputs (if with-documentation?
                 '("out" "doc")
                 '("out")))
    (build-system (if trivial?
                      gnu-build-system
                      texlive-build-system))
    (arguments
     (let ((copy-files
            `(lambda* (#:key outputs inputs #:allow-other-keys)
               (let (,@(if with-documentation?
                           `((doc (string-append (assoc-ref outputs "doc")
                                                 "/share/texmf-dist/")))
                           '())
                     (out (string-append (assoc-ref outputs "out")
                                         "/share/texmf-dist/")))
                 ,@(if with-documentation?
                       '((mkdir-p doc)
                         (copy-recursively
                          (string-append (assoc-ref inputs "source") "/doc")
                          (string-append doc "/doc")))
                       '())
                 (mkdir-p out)
                 (copy-recursively (assoc-ref inputs "source") out)
                 ,@(if with-documentation?
                       '((delete-file-recursively (string-append out "/doc")))
                       '())
                 #t))))
       (if trivial?
           `(#:tests? #f
             #:phases
             (modify-phases %standard-phases
               (delete 'configure)
               (replace 'build (const #t))
               (replace 'install ,copy-files)))
           `(#:phases
             (modify-phases %standard-phases
               (add-after 'install 'copy-files ,copy-files))))))
    (home-page #f)
    (synopsis #f)
    (description #f)
    (license #f)))

(define-public texlive-amsfonts-patched
  (let ((template (simple-texlive-package
                   "texlive-amsfonts"
                   (list "/source/latex/amsfonts/"
                         "/fonts/source/public/amsfonts/"
                         "/fonts/type1/public/amsfonts/"
                         "/fonts/afm/public/amsfonts/"
                         "/fonts/map/dvips/amsfonts/"
                         "/tex/plain/amsfonts/"
                         "/doc/fonts/amsfonts/")
                   (base32
                    "15q70nkjf8wqzbd5ivcdx3i2sdgqxjb38q0qn9a2qw9i0qcnx6zw"))))
    (package
      (inherit template)
      (arguments
       (substitute-keyword-arguments (package-arguments template)
         ((#:build-targets _ #t)
          '(list "amsfonts.ins"))
         ((#:tex-directory _ #t)
          "latex/amsfonts")
         ((#:modules modules '())
          `((guix build texlive-build-system)
            (guix build utils)
            (ice-9 match)
            (srfi srfi-1)
            (srfi srfi-26)))
         ((#:phases phases)
          `(modify-phases ,phases
             (add-before 'build 'build-fonts
               (lambda* (#:key inputs #:allow-other-keys)
                 (let ((mf  (assoc-ref inputs "texlive-union"))
                       (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
                   ;; Make METAFONT reproducible
                   (setenv "SOURCE_DATE_EPOCH" "1")
                   ;; Tell mf where to find mf.base
                   (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                   ;; Tell mf where to look for source files
                   (setenv "MFINPUTS"
                           (string-append src ":"
                                          src "/cmextra:"
                                          src "/cyrillic:"
                                          src "/dummy:"
                                          src "/symbols:"
                                          mf "/share/texmf-dist/metafont/base:"
                                          (assoc-ref inputs "texlive-cm")
                                          "/share/texmf-dist/fonts/source/public/cm")))
                 (let ((build (string-append (getcwd) "/build-fonts")))
                   (mkdir-p build)
                   (with-directory-excursion "fonts/source/public/amsfonts"
                     (for-each (lambda (font)
                                 (format #t "building font ~a\n" (basename font ".mf"))
                                 (with-directory-excursion (dirname font)
                                   (invoke "mf" "-progname=mf"
                                           (string-append "-output-directory=" build)
                                           (string-append "\\"
                                                          "mode:=ljfour; "
                                                          "mag:=1; "
                                                          "nonstopmode; "
                                                          "input "
                                                          (getcwd) "/"
                                                          (basename font ".mf")))))
                               (find-files "." "[0-9]+\\.mf$"))))

                 ;; There are no metafont sources for the Euler fonts, so we
                 ;; convert the afm files instead.
                 (let ((build (string-append (getcwd) "/build-fonts/euler")))
                   (mkdir build)
                   (with-directory-excursion "fonts/afm/public/amsfonts/euler/"
                     (for-each (lambda (font)
                                 (format #t "converting afm font ~a\n" (basename font ".afm"))
                                 (invoke "afm2tfm" font
                                         (string-append build "/"
                                                        (basename font ".tfm"))))
                               (find-files "." "\\.afm$")))

                   ;; Frustratingly, not all fonts can be created this way.  To
                   ;; generate eufm8.tfm, for example, we first scale down
                   ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
                   ;; the pl file.
                   (setenv "TEXINPUTS"
                           (string-append build "//:"
                                          (getcwd) "/fonts/afm/public/amsfonts//:"
                                          (getcwd) "/source/latex/amsfonts//:"
                                          (assoc-ref inputs "texlive-union") "//"))
                   (with-directory-excursion build
                     (for-each (match-lambda
                                 (((target-base target-size)
                                   (source-base source-size))
                                  (let ((factor (number->string
                                                 (truncate/ (* 1000 target-size)
                                                            source-size))))
                                    (invoke "tex"
                                            "-interaction=scrollmode"
                                            (string-append "\\input fontinst.sty "
                                                           "\\transformfont{" target-base "}"
                                                           "{\\scalefont{" factor "}"
                                                           "{\\fromafm{" source-base "}}} "
                                                           "\\bye")))
                                  (invoke "pltotf"
                                          (string-append target-base ".pl")
                                          (string-append target-base ".tfm"))
                                  (delete-file (string-append target-base ".pl"))))

                               '((("eufm8" 8) ("eufm10" 10))

                                 (("eufb6" 6) ("eufb7" 7))
                                 (("eufb8" 8) ("eufb10" 10))
                                 (("eufb9" 9) ("eufb10" 10))

                                 (("eufm6" 6) ("eufb7" 7))
                                 (("eufm9" 9) ("eufb10" 10))

                                 (("eurb6" 6) ("eurb7" 7))
                                 (("eurb8" 8) ("eurb10" 10))
                                 (("eurb9" 9) ("eurb10" 10))

                                 (("eurm6" 6) ("eurm7" 7))
                                 (("eurm8" 8) ("eurm10" 10))
                                 (("eurm9" 9) ("eurm10" 10))))))
                 #t))
             (add-after 'install 'install-generated-fonts
               (lambda* (#:key inputs outputs #:allow-other-keys)
                 (copy-recursively "build-fonts"
                                   (string-append
                                    (assoc-ref outputs "out")
                                    "/share/texmf-dist/fonts/tfm/public/amsfonts"))
                 #t))))))
      (native-inputs
       `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
                                                texlive-cm
                                                texlive-metafont-base)))))
      (home-page "https://www.ctan.org/pkg/amsfonts")
      (synopsis "TeX fonts from the American Mathematical Society")
      (description
       "This package provides an extended set of fonts for use in mathematics,
including: extra mathematical symbols; blackboard bold letters (uppercase
only); fraktur letters; subscript sizes of bold math italic and bold Greek
letters; subscript sizes of large symbols such as sum and product; added sizes
of the Computer Modern small caps font; cyrillic fonts (from the University of
Washington); Euler mathematical fonts.  All fonts are provided as Adobe Type 1
files, and all except the Euler fonts are provided as Metafont source.  The
distribution also includes the canonical Type 1 versions of the Computer
Modern family of fonts.  The Euler fonts are supported by separate packages;
details can be found in the documentation.")
      (license license:silofl1.1))))

(define-public texlive-logreq
  (package
    (name "texlive-logreq")
    (version (number->string %texlive-revision))
    (source
     (origin
       (method svn-fetch)
       (uri (svn-reference
             (url (string-append "svn://www.tug.org/texlive/tags/"
                                 %texlive-tag "/Master/texmf-dist/"
                                 "/tex/latex/logreq"))
             (revision %texlive-revision)))
       (file-name (string-append name "-" version "-checkout"))
       (sha256
        (base32
         "016l3p0f315cwq2ylpd2a7dwlxb42xxcd2al5j1wpg8g8scwbfq5"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let ((target (string-append (assoc-ref %outputs "out")
                                      "/share/texmf-dist/tex/latex/logreq")))
           (mkdir-p target)
           (copy-recursively (assoc-ref %build-inputs "source") target)
           #t))))
    (home-page "https://www.ctan.org/pkg/logreq")
    (synopsis "Support for automation of the LaTeX workflow")
    (description
     "The package helps to automate a typical LaTeX workflow that
involves running LaTeX several times, running tools such as BibTeX or
makeindex, and so on. It will log requests like \"please rerun LaTeX\"
or \"please run BibTeX on file X\" to an external XML file which lists
all open tasks in a machine-readable format. Compiler scripts and
integrated LaTeX editing environments may parse this file to determine
the next steps in the workflow in a way that is more efficient than
parsing the main log file. In sum, the package will do two things:
enable package authors to use LaTeX commands to issue requests,
collect all requests from all packages and write them to an external
XML file at the end of the document.")
    (license license:lppl1.3)))

(define-public texlive-biblatex
  (package
    (name "texlive-biblatex")
    (version (number->string %texlive-revision))
    (source
     (origin
       (method svn-fetch)
       (uri (svn-reference
             (url (string-append "svn://www.tug.org/texlive/tags/"
                                 %texlive-tag "/Master/texmf-dist/"
                                 "/tex/latex/biblatex"))
             (revision %texlive-revision)))
       (file-name (string-append name "-" version "-checkout"))
       (sha256
        (base32
         "116wczqpk3lyc7a18a918bd35pqm4cpngv67xs35g864hp24s7m2"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let ((target (string-append (assoc-ref %outputs "out")
                                      "/share/texmf-dist/tex/latex/biblatex")))
           (mkdir-p target)
           (copy-recursively (assoc-ref %build-inputs "source") target)
           #t))))
    (propagated-inputs
     `(("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
       ("texlive-url" ,texlive-url)
       ("texlive-etex" ,texlive-etex)
       ("texlive-logreq" ,texlive-logreq)))
    (home-page "https://www.ctan.org/pkg/biblatex")
    (synopsis "Process bibliographies for LaTeX")
    (description
     "BibLaTeX is a complete reimplementation of the bibliographic
facilities provided by LaTeX. Formatting of the bibliography is
entirely controlled by LaTeX macros, and a working knowledge of LaTeX
should be sufficient to design new bibliography and citation
styles. BibLaTeX uses its own data backend program called \"biber\" to
read and process the bibliographic data. With biber, BibLaTeX has many
features rivalling or surpassing other bibliography systems. To
mention a few: Full Unicode support Highly customisable sorting using
the Unicode Collation Algorithm + CLDR tailoring Highly customisable
bibliography labels Complex macro-based on-the-fly data modification
without changing your data sources A tool mode for transforming
bibliographic data sources Multiple bibliographies and lists of
bibliographic information in the same document with different sorting
Highly customisable data source inheritance rules Polyglossia and
babel suppport for automatic language switching for bibliographic
entries and citations Automatic bibliography data recoding (UTF-8 ->
latin1, LaTeX macros -> UTF-8 etc) Remote data sources Highly
sophisticated automatic name and name list disambiguation system
Highly customisable data model so users can define their own
bibliographic data types Validation of bibliographic data against a
data model Subdivided and/or filtered bibligraphies, bibliographies
per chapter, section etc. Apart from the features unique to BibLaTeX,
the package also incorporates core features of the following packages:
babelbib, bibtopic, bibunits, chapterbib, cite, inlinebib, mcite and
mciteplus, mlbib, multibib, splitbib. The package strictly requires
e-TeX BibTeX, bibtex8, or Biber etoolbox 2.1 or later logreq 1.0 or
later keyval ifthen url Biber, babel / polyglossia, and csquotes 4.4
or later are strongly recommended.")
    (license license:lppl1.3)))

texlive-biblatex


code:
(define-module (staging untrunc)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix git-download)
  #:use-module (gnu packages video)
  #:use-module (guix utils))

(define-public untrunc
  (let ((commit "45f310f1f3c9a9449b46a74594d1dcbf4bd6b1fb")
        (revision "1"))
    (package
      (name "untrunc")
      (version (git-version "0.0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/anthwlock/untrunc.git")
                      (commit commit)))
                (sha256
                 (base32
                  "1cmimpamxaydwd6m7f86sms7nbzzyq7aywmjf24ijhpwgrvzibrh"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f
         #:phases (modify-phases %standard-phases
                    (delete 'configure)
                    (replace 'install
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((out (assoc-ref outputs "out"))
                               (bin-dir (string-append out "/bin")))
                          (mkdir-p bin-dir)
                          (install-file "untrunc" bin-dir)
                          #t))))))
      (inputs
       `(("ffmpeg" ,ffmpeg)))
      (home-page "https://github.com/anthwlock/untrunc")
      (synopsis "Restore a truncated mp4/mov file")
      (description "Restore a damaged (truncated) mp4, m4v, mov, 3gp
video. Provided you have a similar not broken video. And some luck.")
      (license license:gpl2))))

untrunc


code:
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;;
;;; This file is NOT 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.gnu.org/licenses/>.

(define-module (staging web-extensions)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages python)
  #:use-module (gnu packages compression)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public ublock-assets
  (let ((commit "a3535ee934034065790ab394f7e38d1f021b66b7"))
    (package
      (name "ublock-assets")
      (version (git-version "0" "0" commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/uBlockOrigin/uAssets.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1ifzb625pamqq3mxz4m8w7gc3g0dpbsj26z2iwp0g0rpwpsn3xh3"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
         #:builder (begin
                     (use-modules (guix build utils))
                     (let ((source (assoc-ref %build-inputs "source")))
                       (mkdir-p %output)
                       (copy-recursively source %output)))))
      (home-page "https://github.com/uBlockOrigin/uAssets")
      (synopsis "Filter lists and rulesets for blockers")
      (description
       "uAssets includes resources for uBlock Origin and uMatrix.  It
consists of static filter lists and ready-to-use rulesets.")
      (license license:gpl3+))))

(define-public web-extension-ublock-origin
  (package
    (name "web-extension-ublock-origin")
    (version "1.29.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/gorhill/uBlock.git")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "020c4gl90masdzb8wi0ydfhky74wdwhg5msl38xw33bvy8dwc1gq"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:modules ((guix build json)
                  (jlicht build xpi-utils)
                  ,@%gnu-build-system-modules)
       #:imported-modules (,@%gnu-build-system-modules
                           (guix build json)
                           (jlicht build xpi-utils))
       #:phases (modify-phases %standard-phases
                  (add-after 'unpack 'fix-paths
                    (lambda* (#:key inputs outputs #:allow-other-keys)
                      (let ((python (string-append (assoc-ref inputs "python")
                                                   "/bin/python3"))
                            (assets (assoc-ref inputs "ublock-assets"))
                            (out (assoc-ref outputs "out")))
                        (substitute* "tools/make-firefox.sh"
                          (("python")
                           python))
                        (substitute* "tools/make-assets.sh"
                          (("\\.\\./uAssets")
                           assets)))
                      #t))
                  (delete 'configure)
                  (add-before 'build 'make-writable
                    (lambda _
                      (for-each
                       (lambda (file)
                         (chmod file #o644))
                       (find-files "." "."))
                      #t))
                  (replace 'build
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let (
                            (out (assoc-ref outputs "out")))
                        (invoke "sh" "tools/make-firefox.sh" "all"))))
                  (replace 'install
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (xpi-file (string-append "dist/build/uBlock0.firefox.xpi"))
                             (str (read-manifest-json xpi-file))
                             (id (extract-id str))
                             (extension-file (string-append "dist/build/"
                                                            id ".xpi")))
                        (rename-file xpi-file extension-file)
                        (install-file  extension-file
                                       (string-append out "/extensions"))
                        #t))))))
    (native-inputs
     `(("zip" ,zip)
       ("unzip" ,unzip)
       ("python" ,python)
       ("ublock-assets" ,ublock-assets)))
    (home-page "https://github.com/gorhill/uBlock")
    (synopsis "Efficient blocker implemented as WebExtension")
    (description "uBlock Origin is a wide-spectrum blocker. By default
it blocks ads, trackers and malware sites.")
    (license license:gpl3+)))

web-extension-ublock-origin


code:
(define-module (utils from-git)
  #:use-module (gnu)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix)
  #:export (from-git))

(define (from-git pkg remote commit revision hash)
  (package
    (inherit pkg)
    (name (string-append (package-name pkg) ".git"))
    (version (git-version (package-version pkg) revision commit))
    (source
       (origin
	 (method git-fetch)
	 (uri (git-reference
	       (url remote)
               (commit commit)))
         (file-name (string-append name "-" version))
	 (sha256 (base32 hash))))))


code:
(define-module (utils with-updated)
  #:use-module (gnu)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix)
  #:use-module (srfi srfi-1)
  #:export (with-updated))

(define (with-updated pkg
                      input-name
                      updated-package)
  (package
    (inherit pkg)
    (propagated-inputs
     `((,input-name ,updated-package)
       ,@(alist-delete input-name (package-propagated-inputs pkg))))))


code:
This repository contains my bash configuration and some shell scripts I
use.  Most of the scripts I wrote myself and some were inspired and
derived from other scripts out there (there are links to the original
sources).

Although all scripts have a =#!/bin/sh= shebang, actually some of them
are bash scripts, but since we don't have =/bin/bash= in a [[http://www.gnu.org/software/guix/][Guix System
Distribution]], I just use =/bin/sh= everywhere.

repo_name: alezost/shell

license: mit


code:
# -*- mode: sh -*-

# If not running interactively, do nothing.
[ -z "$PS1" ] && return

################################################################
### History

# Do not put duplicate lines in the history.
HISTCONTROL=erasedups:ignorespace
HISTSIZE=1000
HISTTIMEFORMAT='%Y-%m-%d %H:%M  '
HISTIGNORE="cd:pwd:ls:l:ll:fg:bg:jobs:j"
HISTFILESIZE=9999

# Double check of history substitutions.
shopt -s histverify
# All terminals use .bash_history file without overwriting it.
shopt -s histappend
#PROMPT_COMMAND="history -a"

################################################################
### Command prompts and titles

PS1='\[\033[32m\]\A \[\033[0m\]\u\[\033[35m\]@\[\033[0m\]\h \[\033[40;1;33m\]\j\[\033[0;0;36m\] \! \[\033[1;34m\]\w\[\033[1;37m\]\n\[\033[0;1;31m\]\$\[\033[0m\] '
PS2='\[\e[34m\]\#>\[\e[0m\] '

if [ -n "$GUIX_ENVIRONMENT" ]; then
    PS1="\[\033[31m\][guix env] $PS1"
fi

case "$TERM" in
    xterm*|rxvt*)
        PS1="\[\e]0;\W\a\]$PS1"
        ;;
    *)
        ;;
esac

################################################################
### Aliases

alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

alias sudo='sudo '
alias se='SUDO_EDITOR=emacsclient sudoedit'

alias ll='ls -AlFh --group-directories-first'
alias l='ls -CAF --group-directories-first'
alias j='jobs'
alias p='pgrep -l'
alias temperature='sudo hddtemp /dev/sd[ab]'
alias pingg='ping -c3 google.com'

alias pac='pacman'
alias pacq='pacman -Q'
alias pacqi='pacman -Qi'
alias pacql='pacman -Ql'
alias pacqo='pacman -Qo'
alias pacqs='pacman -Qs'
alias pacs='sudo pacman -S'
alias pacsuy='sudo pacman -Suy'
alias pacss='pacman -Ss'
alias pacsi='pacman -Si'
alias pacr='sudo pacman -R'
alias pacu='sudo pacman -U'

alias reboot='sudo reboot'
alias halt='sudo halt'
alias hyp-suspend='ssh root@hyperion "systemctl start systemd-suspend"'

alias sc='sudo systemctl --no-pager'
alias scu='systemctl --user --no-pager'
alias scd='sudo systemctl daemon-reload'
alias scud='systemctl --user daemon-reload'
alias scuenv='systemctl --user --no-pager --full show-environment'
alias scenv='systemctl --no-pager --full show-environment'

alias Herd='sudo /run/current-system/profile/bin/herd'
alias doc='herd doc'
alias status='herd status'
alias stop='herd stop'
alias start='herd start'
alias restart='herd restart'
alias Doc='Herd doc'
alias Status='Herd status'
alias Stop='Herd stop'
alias Start='Herd start'
alias Restart='Herd restart'

alias e='emacs --no-site-file &'
alias eq='emacs -nw -Q'
alias gc='guile-compile'
alias m='mpv --quiet'
alias my='mpv --quiet --ytdl'
alias y='youtube-dl'
alias yg='youtube-dl -f22'
alias yb='youtube-dl -f18'

################################################################
### Misc

shopt -s autocd
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# Unbind C-s and C-u.
# stty -ixon
stty kill ^- stop ^-

# Disable 'suspend' builtin command as I use a script with the same name.
enable -n suspend

path: bash/bashrc


code:
set show-all-if-ambiguous on

"\C-o": backward-char
"\eo": backward-word
"\C-u": forward-char
"\eu": forward-word

"\ea": beginning-of-line
"\ei": end-of-line

"\eU": upcase-word
"\eL": downcase-word
"\eC": capitalize-word
"\C-7": downcase-word
"\C-8": capitalize-word
"\C-9": upcase-word

"\e.": previous-history
"\ee": next-history

"\er": reverse-search-history
"\es": forward-search-history

"\C-p": backward-delete-char
"\ep": backward-kill-word
"\eP": backward-kill-line

"\C-,": delete-char
"\e,": kill-word
"\e<": kill-line

"\eA": beginning-of-history
"\eI": end-of-history

# "\C-x\C-?": unix-line-discard
"\C-k": kill-whole-line

"\ex": transpose-words

"\ek": copy-backward-word
"\eq": copy-forward-word

"\e;": insert-comment
"\e#": complete-filename
"\e%": insert-last-argument

path: bash/inputrc