From 541f93ada0a1e32c615f70b55ec41cdfba44668f Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sat, 15 May 2021 11:17:11 +0200 Subject: gnu: Add hg-commitsigs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/version-control.scm (hg-commitsigs): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/version-control.scm | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'gnu/packages/version-control.scm') diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 5438f6349c..3a6de3399e 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -62,6 +62,7 @@ (define-module (gnu packages version-control) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix hg-download) + #:use-module (guix build python-build-system) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) @@ -88,6 +89,7 @@ (define-module (gnu packages version-control) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages groff) #:use-module (gnu packages guile) @@ -1716,6 +1718,67 @@ (define-public python-hg-evolve history. It implements the changeset evolution concept for Mercurial.") (license license:gpl2))) +(define-public hg-commitsigs + ;; Latest tag is 11 years old. + (let ((changeset "b53eb6862bff") + (revision "0")) + (package + (name "hg-commitsigs") + (version (git-version "0.1.0" revision changeset)) + (source (origin + (method hg-fetch) + (uri (hg-reference + (url "https://foss.heptapod.net/mercurial/commitsigs") + (changeset changeset))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "059gm66q06m6ayl4brsc517zkw3ahmz249b6xm1m32ac5y24wb9x")))) + (build-system copy-build-system) + (arguments + `(#:imported-modules ((guix build python-build-system) + ,@%copy-build-system-modules) + #:modules ((srfi srfi-1) + (guix build python-build-system) + ;; Don't use `%copy-build-system-modules' because + ;; `standard-phases' from (guix build gnu-build-system) + ;; shadows the one from (guix build copy-build-system), + ;; which is the one we actually want. + (guix build copy-build-system) + ((guix build gnu-build-system) #:prefix gnu) + (guix build utils) + (guix build gremlin) + (ice-9 ftw) + (guix elf)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((gpg (string-append (assoc-ref inputs "gnupg") + "/bin/gpg")) + (openssl (string-append (assoc-ref inputs "openssl") + "/bin/openssl"))) + (substitute* "commitsigs.py" + (("b'gpg',") (string-append "b'" gpg "',")) + (("b'openssl',") (string-append "b'" openssl "',"))))))) + #:install-plan + `(("commitsigs.py" ,(string-append "lib/python" + (python-version + (assoc-ref %build-inputs "python")) + "/site-packages/hgext3rd/commitsigs.py"))))) + (native-inputs + `(("python" ,python))) + (inputs + `(("gnupg" ,gnupg) + ("openssl" ,openssl))) + (home-page "https://foss.heptapod.net/mercurial/commitsigs") + (synopsis "Automatic signing of changeset hashes") + (description "This package provides a Mercurial extension for signing +the changeset hash of commits. The signure is embedded directly in the +changeset itself; there won't be any extra commits. Either GnuPG or OpenSSL +can be used for signing.") + (license license:gpl2)))) ;per commitsigs.py + (define-public neon (package (name "neon") -- cgit v1.2.3 From ae0882bbd686cb213420bd7b84601e0c97771cf7 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sat, 15 May 2021 11:17:12 +0200 Subject: gnu: mercurial: Patch to make it read HGEXTENSIONPATH. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will make Mercurial be able to find third-party extensions installed with Guix, without having to set PYTHONPATH. * gnu/packages/patches/mercurial-hg-extension-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Register the patch. * gnu/packages/version-control.scm (mercurial)[origin](patches): Apply the patch. [native-search-paths]: Add HGEXTENSIONPATH. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + .../patches/mercurial-hg-extension-path.patch | 29 ++++++++++++++++++++++ gnu/packages/version-control.scm | 6 +++++ 3 files changed, 36 insertions(+) create mode 100644 gnu/packages/patches/mercurial-hg-extension-path.patch (limited to 'gnu/packages/version-control.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 97b4dd77f6..0d3ab38623 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1413,6 +1413,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ %D%/packages/patches/libmemcached-build-with-gcc7.patch \ %D%/packages/patches/libmhash-hmac-fix-uaf.patch \ + %D%/packages/patches/mercurial-hg-extension-path.patch \ %D%/packages/patches/mesa-skip-tests.patch \ %D%/packages/patches/mescc-tools-boot.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ diff --git a/gnu/packages/patches/mercurial-hg-extension-path.patch b/gnu/packages/patches/mercurial-hg-extension-path.patch new file mode 100644 index 0000000000..d1073dd01c --- /dev/null +++ b/gnu/packages/patches/mercurial-hg-extension-path.patch @@ -0,0 +1,29 @@ +This is needed to make Mercurial read the HGEXTENSIONPATH to detect +third-party extensions. It is called HGEXTENSIONPATH and not +HG_EXTENSION_PATH to keep it consistent with other environment variables for +Mercurial, e.g. HGENCODINGAMBIGUOUS, HGEDITOR ... Hopefully I or someone else +will get this into Mercurial proper. + +diff --git a/mercurial/extensions.py b/mercurial/extensions.py +--- a/mercurial/extensions.py ++++ b/mercurial/extensions.py +@@ -13,6 +13,7 @@ + import imp + import inspect + import os ++import sys + + from .i18n import ( + _, +@@ -108,6 +109,11 @@ + + def _importh(name): + """import and return the module""" ++ # Read HGEXTENSIONSPATH environment variable when import extensions. ++ extension_path = os.getenv("HGEXTENSIONSPATH") ++ if extension_path is not None: ++ for path in extension_path: ++ sys.path.append(path) + mod = __import__(pycompat.sysstr(name)) + components = name.split(b'.') + for comp in components[1:]: diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 3a6de3399e..167495c80c 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1614,6 +1614,7 @@ (define-public mercurial (method url-fetch) (uri (string-append "https://www.mercurial-scm.org/" "release/mercurial-" version ".tar.gz")) + (patches (search-patches "mercurial-hg-extension-path.patch")) (sha256 (base32 "17rhlmmkqz5ll3k68jfzpcifg3nndbcbc2nx7kw8xn3qcj7nlpgw")))) @@ -1684,6 +1685,11 @@ (define-public mercurial ("which" ,which))) (inputs `(("python" ,python))) + ;; Find third-party extensions. + (native-search-paths + (list (search-path-specification + (variable "HGEXTENSIONPATH") + (files '("lib/python3.8/site-packages/hgext3rd"))))) (home-page "https://www.mercurial-scm.org/") (synopsis "Decentralized version control system") (description -- cgit v1.2.3 From c2649f2811c4d2931a406f272c4af74dfd05cd1a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 18 May 2021 19:35:14 +0200 Subject: gnu: asciidoc: Remove Python 2 variant. * gnu/packages/documentation.scm (asciidoc): Update to 9.1.0. [inputs]: Replace PYTHON-2 with PYTHON. (asciidoc-py3): Define as deprecated alias for ASCIIDOC. * gnu/packages/version-control.scm (git)[native-inputs]: Change from ASCIIDOC-PY3 to ASCIIDOC. * gnu/packages/wm.scm (i3-wm)[native-inputs]: Likewise. --- gnu/packages/documentation.scm | 44 ++++++++++++---------------------------- gnu/packages/version-control.scm | 2 +- gnu/packages/wm.scm | 2 +- 3 files changed, 15 insertions(+), 33 deletions(-) (limited to 'gnu/packages/version-control.scm') diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index 17f73aa58f..39510316d2 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Ricardo Wurmus ;;; Copyright © 2020, 2021 Michael Rohleder +;;; Copyright © 2021 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ (define-module (gnu packages documentation) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix build-system qt) + #:use-module (guix deprecation) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -101,16 +103,16 @@ (define-public latex2html (define-public asciidoc (package (name "asciidoc") - (version "8.6.10") + (version "9.1.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/asciidoc-py/asciidoc-py2") - (commit version))) + (url "https://github.com/asciidoc/asciidoc-py") + (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "1hrqkgjmp1gq3f9rkbr8l0y62fzvwb9n8ys35s25bg2ld04y4g4y")))) + "1clf1axkns23wfmh48xfspzsnw04pjh4mq1pshpzvj0cwxhz0yaq")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no 'check' target @@ -159,11 +161,12 @@ (define-public asciidoc #t))))) (native-inputs `(("autoconf" ,autoconf))) - (inputs `(("python" ,python-2) - ("docbook-xml" ,docbook-xml) - ("docbook-xsl" ,docbook-xsl) - ("libxml2" ,libxml2) - ("libxslt" ,libxslt))) + (inputs + `(("python" ,python) + ("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt))) (home-page "https://asciidoc.org/") (synopsis "Text-based document generation system") (description @@ -177,28 +180,7 @@ (define-public asciidoc markup) can be customized and extended by the user.") (license gpl2+))) -(define-public asciidoc-py3 - (package (inherit asciidoc) - (name "asciidoc-py3") - (version "9.1.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/asciidoc/asciidoc-py") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1clf1axkns23wfmh48xfspzsnw04pjh4mq1pshpzvj0cwxhz0yaq")))) - (build-system gnu-build-system) - (native-inputs - `(("autoconf" ,autoconf))) - (inputs - `(("python" ,python) - ("docbook-xml" ,docbook-xml) - ("docbook-xsl" ,docbook-xsl) - ("libxml2" ,libxml2) - ("libxslt" ,libxslt))))) +(define-deprecated asciidoc-py3 asciidoc) (define-public doxygen (package diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 167495c80c..80842ecf0c 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -204,7 +204,7 @@ (define-public git (base32 "00n7vbfmd3ywgjksgwrszwj0l2niba64qkaq07ra4p8mawy483ax")))) ;; For subtree documentation. - ("asciidoc" ,asciidoc-py3) + ("asciidoc" ,asciidoc) ("docbook-xsl" ,docbook-xsl) ("xmlto" ,xmlto) ("pkg-config" ,pkg-config))) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index da850acb00..c7a1c5a7ac 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -334,7 +334,7 @@ (define-public i3-wm `(("which" ,which) ("perl" ,perl) ("pkg-config" ,pkg-config) - ("asciidoc-py3" ,asciidoc-py3) + ("asciidoc" ,asciidoc) ;; For building the documentation. ("libxml2" ,libxml2) ("docbook-xsl" ,docbook-xsl))) -- cgit v1.2.3