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.")
455 ;; git-reference because tests are not included in pypi source tarball 455 ;; git-reference because tests are not included in pypi source tarball
456 ;; https://issues.guix.gnu.org/issue/36755#2 456 ;; https://issues.guix.gnu.org/issue/36755#2
457 (uri (git-reference 457 (uri (git-reference
458 (url "https://github.com/projectmallard/mallard-ducktype") 458 (url "https://github.com/projectmallard/mallard-ducktype")
459 (commit version))) 459 (commit version)))
460 (file-name (git-file-name name version)) 460 (file-name (git-file-name name version))
461 (sha256 461 (sha256
462 (base32 462 (base32
463 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c")))) 463 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
464 (build-system pyproject-build-system) 464 (build-system gnu-build-system)
465 (arguments 465 (arguments
466 '(#:phases 466 (list
467 (modify-phases %standard-phases 467 ;; Essentially a lighter copy of the former python-build-system.
468 (replace 'check 468 ;; Using it rather than pyproject-build-system allows to edit the latter
469 (lambda _ 469 ;; without a texlive + haskell world rebuild.
470 (with-directory-excursion "tests" 470 #:phases
471 (invoke "sh" "runtests"))))))) 471 #~(modify-phases %standard-phases
472 (native-inputs (list python-setuptools)) 472 (delete 'bootstrap)
473 (delete 'configure)
474 (replace 'build
475 (lambda _
476 (invoke "python" "./setup.py" "build")))
477 (replace 'install
478 (lambda _
479 (invoke "python" "./setup.py" "install"
480 (string-append "--prefix=" #$output) "--no-compile")
481 (invoke "python" "-m" "compileall"
482 "--invalidation-mode=unchecked-hash" #$output)))
483 (add-after 'install 'wrap
484 (lambda _
485 (let* ((parser (car (find-files #$output "^parser\\.py$")))
486 (site (dirname (dirname (dirname parser)))))
487 (wrap-program (string-append #$output "/bin/ducktype")
488 #:sh (which "bash")
489 `("GUIX_PYTHONPATH" ":" = (,site))))))
490 (replace 'check
491 (lambda* (#:key tests? #:allow-other-keys)
492 (if tests?
493 (with-directory-excursion "tests"
494 (invoke "sh" "runtests"))
495 (format #t "test suite not run.~%")))))))
496 (native-inputs (list python-setuptools-bootstrap python-wrapper))
473 (home-page "http://projectmallard.org") 497 (home-page "http://projectmallard.org")
474 (synopsis "Convert Ducktype to Mallard documentation markup") 498 (synopsis "Convert Ducktype to Mallard documentation markup")
475 (description 499 (description