summaryrefslogtreecommitdiff
path: root/gnu/packages/documentation.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-11-02 02:19:46 +0100
committerAndreas Enge <andreas@enge.fr>2026-02-07 12:28:19 +0100
commit00ff4d8b32880bf9cf003ac97290ad8b4e3142d4 (patch)
tree218ac83a5ffe47285755db1261c45ec6e17685e6 /gnu/packages/documentation.scm
parent2d6d1d1ca4216045b3278bd196cc7e2d5a5d4066 (diff)
gnu: mallard-ducktype: Build with a custom build-system.
* gnu/packages/documentation.scm (mallard-ducktype) [build-system, arguments]: Build using a custom build-system. Change-Id: I56bc352ab62bf143bbe5d370dd68ff2b2e2bb75e Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/documentation.scm')
-rw-r--r--gnu/packages/documentation.scm44
1 files changed, 34 insertions, 10 deletions
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index 104199a79e1..77a23edb3df 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -455,21 +455,45 @@ inspired by Dash.")
;; git-reference because tests are not included in pypi source tarball
;; https://issues.guix.gnu.org/issue/36755#2
(uri (git-reference
- (url "https://github.com/projectmallard/mallard-ducktype")
- (commit version)))
+ (url "https://github.com/projectmallard/mallard-ducktype")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
- (build-system pyproject-build-system)
+ (build-system gnu-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (with-directory-excursion "tests"
- (invoke "sh" "runtests")))))))
- (native-inputs (list python-setuptools))
+ (list
+ ;; Essentially a lighter copy of the former python-build-system.
+ ;; Using it rather than pyproject-build-system allows to edit the latter
+ ;; without a texlive + haskell world rebuild.
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'bootstrap)
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "python" "./setup.py" "build")))
+ (replace 'install
+ (lambda _
+ (invoke "python" "./setup.py" "install"
+ (string-append "--prefix=" #$output) "--no-compile")
+ (invoke "python" "-m" "compileall"
+ "--invalidation-mode=unchecked-hash" #$output)))
+ (add-after 'install 'wrap
+ (lambda _
+ (let* ((parser (car (find-files #$output "^parser\\.py$")))
+ (site (dirname (dirname (dirname parser)))))
+ (wrap-program (string-append #$output "/bin/ducktype")
+ #:sh (which "bash")
+ `("GUIX_PYTHONPATH" ":" = (,site))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "tests"
+ (invoke "sh" "runtests"))
+ (format #t "test suite not run.~%")))))))
+ (native-inputs (list python-setuptools-bootstrap python-wrapper))
(home-page "http://projectmallard.org")
(synopsis "Convert Ducktype to Mallard documentation markup")
(description