;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015, 2018 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Christopher Baines <mail@cbaines.net>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2022 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages patchutils)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages groff)
#:use-module (gnu packages gtk)
#:use-module (gnu packages less)
#:use-module (gnu packages mail)
(define-public patchutils
(package
(name "patchutils")
- (version "0.3.4")
+ (version "0.4.2")
(source
(origin
- (method url-fetch)
- (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg"))
- (patches (search-patches "patchutils-test-perms.patch"))))
+ (method url-fetch)
+ (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1va5pzmxbzpi87vdnbjm9qdf9bvzps9xfv0gi4mycgg3bybb0xc8"))))
(build-system gnu-build-system)
- (inputs `(("perl" ,perl)))
+ (inputs
+ (list perl python))
(arguments
'(#:parallel-tests? #f
#:phases
(add-before 'check 'patch-test-scripts
(lambda _
(substitute* (find-files "tests" "^run-test$")
- (("/bin/echo") (which "echo")))
- #t))
+ (("/bin/echo") (which "echo")))))
(add-after 'install 'wrap-program
;; Point installed scripts to the utilities they need.
(lambda* (#:key inputs outputs #:allow-other-keys)
,(map (lambda (dir)
(string-append dir "/bin"))
(list diffutils sed gawk)))))
- '("dehtmldiff" "editdiff" "espdiff")))
- #t)))))
+ '("dehtmldiff" "editdiff" "espdiff"))))))))
(home-page "http://cyberelk.net/tim/software/patchutils")
(synopsis "Collection of tools for manipulating patch files")
(description
(base32 "01vfvk4pqigahx82fhaaffg921ivd3k7rylz1yfvy4zbdyd32jri"))))
(build-system gnu-build-system)
(native-inputs
- `(("gettext" ,gnu-gettext)))
- (inputs `(("perl" ,perl)
- ("less" ,less)
- ("file" ,file)
- ("ed" ,ed)
- ("diffstat" ,diffstat)))
+ `(("gettext" ,gettext-minimal)))
+ (inputs (list perl less file ed diffstat))
(arguments
'(#:parallel-tests? #f
#:phases
(define-public colordiff
(package
(name "colordiff")
- (version "1.0.18")
+ (version "1.0.20")
(source
(origin
(method url-fetch)
(string-append "http://www.colordiff.org/archive/colordiff-"
version ".tar.gz")))
(sha256
- (base32
- "1q6n60n4b9fnzccxyxv04mxjsql4ddq17vl2c74ijvjdhpcfrkr9"))))
+ (base32 "1kbv3lsyzzrwca4v3ajpnv8q5j0h53r94lxiqgmikxmrxrxh3cp3"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no tests
(delete 'configure) ; no configure script
(delete 'build)))) ; nothing to build
(inputs
- `(("perl" ,perl)
- ("xmlto" ,xmlto)))
+ (list perl xmlto))
(home-page "https://www.colordiff.org")
(synopsis "Display diff output with colors")
(description
'syntax highlighting' for various patch formats.")
(license gpl2+)))
-(define-public patches
- (let ((commit "ef1b8a7d954b82ed4af3a08fd63d2085d19090ef"))
- (package
- (name "patches")
- (home-page "https://github.com/stefanha/patches")
- (version (string-append "0.0-1." (string-take commit 7)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url home-page)
- (commit commit)))
- (sha256
- (base32
- "11rdmhv0l1s8nqb20ywmw2zqizczch2p62qf9apyx5wqgxlnjshk"))
- (file-name (string-append name "-"version "-checkout"))))
- (build-system python-build-system)
- (inputs `(("python-notmuch" ,python2-notmuch)))
- (arguments
- `(#:tests? #f ;no "test" target
- #:python ,python-2)) ;not compatible with Python 3
- (synopsis "Patch tracking tool")
- (description
- "@code{Patches} is a patch-tracking tool initially written for the QEMU
-project. It provides commands that build a database of patches from a mailing
-list, and commands that can search that database. It allows users to track
-the status of a patch, apply patches, and search for patches---all that from
-the command-line or from Emacs via its Notmuch integration.")
- (license gpl2+))))
-
(define-public vbindiff
(package
(name "vbindiff")
"1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh"))))
(build-system gnu-build-system)
(inputs
- `(("ncurses" ,ncurses)))
+ (list ncurses))
(home-page "https://www.cjmweb.net/vbindiff/")
(synopsis "Console-based tool for comparing binary data")
(description "Visual Binary Diff (@command{vbindiff}) displays files in
(define-public meld
(package
(name "meld")
- (version "3.20.1")
+ (version "3.20.4")
(source
(origin
(method url-fetch)
(version-major+minor version)
"/meld-" version ".tar.xz"))
(sha256
- (base32 "0jdj7kd6vj1mdc16gvrj1kar88b2j5875ajq18fx7cbc9ny46j55"))))
+ (base32 "04vx2mdbcdin0g3w8x910czfch5vyrl8drv1f2l8gxh6qvp113pl"))))
(build-system python-build-system)
(native-inputs
`(("intltool" ,intltool)
(inputs
`(("python-cairo" ,python-pycairo)
("python-gobject" ,python-pygobject)
- ("gtksourceview" ,gtksourceview)))
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gtksourceview" ,gtksourceview-3)))
(propagated-inputs
- `(("dconf" ,dconf)))
+ (list dconf))
(arguments
- `(#:phases
+ `(#:imported-modules ((guix build glib-or-gtk-build-system)
+ ,@%python-build-system-modules)
+ #:modules ((guix build python-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ (guix build utils))
+ #:phases
(modify-phases %standard-phases
;; This setup.py script does not support one of the Python build
;; system's default flags, "--single-version-externally-managed".
(setenv "HOME" "/tmp")
(invoke "py.test" "-v" "-k"
;; TODO: Those tests fail, why?
- "not test_classify_change_actions"))))))
+ "not test_classify_change_actions")))
+ (add-after 'install 'copy-styles
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((styles "/share/gtksourceview-3.0/styles"))
+ (copy-recursively
+ (string-append (assoc-ref inputs "gtksourceview") styles)
+ (string-append (assoc-ref outputs "out") styles))
+ #t)))
+ (add-after 'wrap 'glib-or-gtk-wrap
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+ (add-after 'wrap 'wrap-typelib
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/meld")
+ `("GI_TYPELIB_PATH" prefix
+ ,(search-path-as-string->list (getenv "GI_TYPELIB_PATH"))))
+ #t))))))
(home-page "https://meldmerge.org/")
(synopsis "Compare files, directories and working copies")
(description "Meld is a visual diff and merge tool targeted at
(define-public patchwork
(package
(name "patchwork")
- (version "2.1.2")
+ (version "3.0.4")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/getpatchwork/patchwork.git")
+ (url "https://github.com/getpatchwork/patchwork")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "06ng5pv6744w98zkyfm0ldkmpdgnsql3gbbbh6awq61sr2ndr3qw"))))
+ "0dl0prsyzsnlq6g0jw05mxx00bq9y2rpc3vrbfxfiblyyydrn2xn"))))
(build-system python-build-system)
(arguments
`(;; TODO: Tests require a running database
;; as the python modules in this package in the wsgi.py file,
;; as this will ensure they are available at runtime.
(define pythonpath
- (string-append (getenv "PYTHONPATH")
+ (string-append (getenv "GUIX_PYTHONPATH")
":"
(site-packages inputs outputs)))
(display
(for-each (lambda (directory)
(copy-recursively
directory
- (string-append out-site-packages directory)))
+ (string-append out-site-packages "/" directory)))
'(;; Contains the python code
"patchwork"
;; Contains the templates for the generated HTML
"templates"))
(delete-file-recursively
- (string-append out-site-packages "patchwork/tests"))
+ (string-append out-site-packages "/patchwork/tests"))
;; Install patchwork related tools
(for-each (lambda (file)
(install-file file (string-append out "/bin")))
(list
(string-append out-site-packages
- "patchwork/bin/pwclient")
- (string-append out-site-packages
- "patchwork/bin/parsemail.sh")
+ "/patchwork/bin/parsemail.sh")
(string-append out-site-packages
- "patchwork/bin/parsemail-batch.sh")))
-
- ;; Delete the symlink to pwclient, and replace it with the
- ;; actual file, as this can cause issues when serving the file
- ;; from a webserver.
- (let ((template-pwclient (string-append
- out-site-packages
- "patchwork/templates/patchwork/pwclient")))
- (delete-file template-pwclient)
- (copy-file (string-append out-site-packages
- "patchwork/bin/pwclient")
- template-pwclient))
+ "/patchwork/bin/parsemail-batch.sh")))
;; Collect the static assets, this includes JavaScript, CSS and
;; fonts. This is a standard Django process when running a
(chmod (string-append out "/bin/patchwork-admin") #o555))
#t)))))
(inputs
- `(("python-wrapper" ,python-wrapper)))
+ (list python-wrapper))
(propagated-inputs
- `(("python-django" ,python-django)
- ;; TODO: Make this configurable
- ("python-psycopg2" ,python-psycopg2)
- ("python-mysqlclient" ,python-mysqlclient)
- ("python-django-filter" ,python-django-filter)
- ("python-djangorestframework" ,python-djangorestframework)
- ("python-django-debug-toolbar" ,python-django-debug-toolbar)))
+ (list python-django-3.2
+ ;; TODO: Make this configurable
+ python-psycopg2
+ python-mysqlclient
+ python-django-filter
+ python-django-rest-framework
+ python-django-debug-toolbar))
(synopsis "Web based patch tracking system")
(description
"Patchwork is a patch tracking system. It takes in emails containing
Users can login allowing them to change the state of patches.")
(home-page "http://jk.ozlabs.org/projects/patchwork/")
(license gpl2+)))
+
+(define-public wiggle
+ (package
+ (name "wiggle")
+ (version "1.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/neilbrown/wiggle")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18ilzr9sbal1j8p1d94ilm1j5blac5cngvcvjpdmgmpw6diy2ldf"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list "CFLAGS=-I. -O3" "INSTALL=install" "STRIP=-s"
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "BINDIR=" #$output "/bin")
+ (string-append "MANDIR=" #$output "/share/man")
+ (string-append "PREFIX=" #$output))
+ #:test-target "test"
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "http://neil.brown.name/wiggle/")
+ (inputs (list ncurses))
+ (native-inputs (list groff))
+ (synopsis "Apply patches with conflicts")
+ (description
+ "@code{wiggle} attempts to apply patches to a target file even if the
+patches do not match perfectly.")
+ (license gpl2+)))
+
+(define-public pwclient
+ (package
+ (name "pwclient")
+ (version "1.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/getpatchwork/pwclient")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xckwvcqklzpyh3xs4k2zm40ifp0q5fdkj2vmgb8vhfvl1ivs6jv"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-requirements
+ (lambda _
+ (substitute* "test-requirements.txt"
+ ;; The pytest requirement is unnecessarily strict
+ (("pytest>=3.0,<5.0;")
+ "pytest>=3.0,<6.0;"))
+ #t))
+ (add-before 'build 'set-PBR_VERSION
+ (lambda _
+ (setenv "PBR_VERSION"
+ ,version)
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"))
+ #t))
+ (add-after 'install 'install-man-page
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "man/pwclient.1"
+ (string-append
+ (assoc-ref outputs "out")
+ "/share/man/man1"))
+ #t)))))
+ (native-inputs
+ (list python-pbr python-pytest python-pytest-cov python-mock))
+ (home-page
+ "https://github.com/getpatchwork/pwclient")
+ (synopsis "Command-line client for the Patchwork patch tracking tool")
+ (description
+ "pwclient is a VCS-agnostic tool for interacting with Patchwork, the
+web-based patch tracking system.")
+ (license gpl2+)))