;;; misc.scm --- miscellaneous Guix packages ;;; ;;; Copyright © 2019 Kyle Meyer ;;; ;;; This file is NOT part of GNU Guix. ;;; ;;; This program 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 program 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 program. If not, see ;;; . (define-module (km-packages misc) #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages version-control) #:use-module ((guix build utils) #:select (with-directory-excursion)) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils)) (define-public tojson (package (name "tojson") (version "0.2") (source (origin (method git-fetch) (uri (git-reference (url (string-append "https://github.com/woky/tojson")) (commit (string-append "v" version)))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "18qpwqp1aymlacnaa01kk26zrhdwrypbkrk1i3f182d8h15fghcd")))) (build-system gnu-build-system) (arguments `(#: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 (string-append out "/bin"))) (mkdir-p bin) (install-file "tojson" bin)) #t)) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (path (getenv "PYTHONPATH"))) (wrap-program (string-append out "/bin/tojson") `("PYTHONPATH" ":" prefix (,path)))) #t))))) (inputs `(("python" ,python) ("python-pyyaml" ,python-pyyaml))) (home-page "https://github.com/woky/tojson") (synopsis "todo") (description "todo") (license license:gpl3))) (define-public python-blessed (package (name "python-blessed") (version "1.17.4") (source (origin (method url-fetch) (uri (pypi-uri "blessed" version)) (sha256 (base32 "1087vn3b2bspdir68ziwp0w9mflhpfpqzg9dcffrr2i9hff622ij")) (modules '((guix build utils))) (snippet (quote (begin (delete-file "blessed/win_terminal.py") #t))))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'build 'patch-init (lambda _ ;; FIXME: Look into this failing assertion. (substitute* "blessed/terminal.py" ((" assert value in \\(0, 4, 8, 16, 256, 1 << 24\\)") ""))))))) (native-inputs `(("python-mock" ,python-mock) ("python-pytest" ,python-pytest))) (propagated-inputs `(("python-six" ,python-six) ("python-wcwidth" ,python-wcwidth))) (home-page "https://github.com/jquast/blessed") (synopsis "todo") (description "todo") (license license:expat))) (define-public python-enlighten (package (name "python-enlighten") (version "1.5.1") (source (origin (method url-fetch) (uri (pypi-uri "enlighten" version)) (sha256 (base32 "1vjmnx8wp52ris4j7r4gj88349gdfxpp7ms5vvwizym11a2r4sw3")))) (build-system python-build-system) (propagated-inputs `(("python-blessed" ,python-blessed))) (home-page "https://github.com/Rockhopper-Technologies/enlighten") (synopsis "Enlighten Progress Bar") (description "todo") (license #f))) (define-public grokmirror (package (name "grokmirror") (version "1.2.1") (source (origin (method git-fetch) (uri (git-reference (url (string-append "https://git.kernel.org/pub/scm/" "utils/grokmirror/grokmirror.git")) (commit (string-append "v" version)))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1kli0dzd8qx1f6dfy4pznnjwbp7gii3cbqvzrnrpcl0b5azsxr8g")))) (build-system python-build-system) (arguments `(#:tests? #f ; no tests #:modules ((guix build python-build-system) (guix build utils)) #:imported-modules (,@%python-build-system-modules) #:phases (modify-phases %standard-phases (add-after 'install 'install-manpages (lambda* (#:key outputs #:allow-other-keys) (let* ((man (string-append (assoc-ref outputs "out") "/man/man1/"))) (mkdir-p man) (for-each (lambda (file) (install-file file man)) (find-files "." "\\.1$"))) #t))))) (propagated-inputs `(("python-anyjson" ,python-anyjson) ("python-enlighten" ,python-enlighten) ("python-gitpython" ,python-gitpython))) (home-page "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git") (synopsis "Smartly mirror git repositories that use grokmirror") (description "todo") (license #f))) (define-public b4 (let ((commit "cbcc79012d44e6b7e79583d078409628b8834a69")) (package (name "b4") (version (git-version "0.3.4" "0" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://git.kernel.org/pub/scm/utils/b4/b4.git") (commit commit))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1x73r59h097fsk57i3k0y26qilz4iq1ppn7fxs30fdfqgx7ga2l3")))) (build-system python-build-system) (inputs `(("python-requests" ,python-requests))) (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git") (synopsis "A tool to work with public-inbox patches") (description "todo") (license license:gpl2+))))