Archived
1
0
Fork 0

gnu: ronn-ng: Fix build.

* gnu/packages/groff.scm (ronn-ng)[arguments]: Add 'patch-test phase and
update style.
This commit is contained in:
Christopher Baines 2023-06-29 10:31:27 +01:00
parent 7ed11ca491
commit 6d82239a5f
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -32,6 +32,7 @@
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system ruby) #:use-module (guix build-system ruby)
#:use-module (guix gexp)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages ruby) #:use-module (gnu packages ruby)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
@ -229,14 +230,21 @@ It is typically used to display man pages on a web site.")
"1slxfg57cabmh98fw507z4ka6lwq1pvbrqwppflxw6700pi8ykfh")))) "1slxfg57cabmh98fw507z4ka6lwq1pvbrqwppflxw6700pi8ykfh"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-test
(lambda _
;; TODO This should be removed once the upstream fix is released
;; https://github.com/apjanke/ronn-ng/commit/e194bf62b1d0c0828cc83405e60dc5ece829e62f
(substitute* "test/test_ronn_document.rb"
(("YAML\\.load\\(@doc\\.to_yaml\\)")
"YAML.load(@doc.to_yaml, permitted_classes: [Time])"))))
(add-after 'extract-gemspec 'fix-gemspec-mustache (add-after 'extract-gemspec 'fix-gemspec-mustache
(lambda _ (lambda _
(substitute* "ronn-ng.gemspec" (substitute* "ronn-ng.gemspec"
(("(<mustache>.freeze.*~>).*(\".*$)" all start end) (("(<mustache>.freeze.*~>).*(\".*$)" all start end)
(string-append start " 1.0" end))) (string-append start " 1.0" end)))))
#t))
(add-after 'wrap 'wrap-program (add-after 'wrap 'wrap-program
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((prog (string-append (assoc-ref %outputs "out") "/bin/ronn"))) (let ((prog (string-append (assoc-ref %outputs "out") "/bin/ronn")))
@ -248,8 +256,7 @@ It is typically used to display man pages on a web site.")
"/bin")) "/bin"))
'("ruby-kramdown" '("ruby-kramdown"
"ruby-mustache" "ruby-mustache"
"ruby-nokogiri"))))) "ruby-nokogiri"))))))))))
#t)))))
(inputs (inputs
(list ruby-kramdown ruby-mustache ruby-nokogiri)) (list ruby-kramdown ruby-mustache ruby-nokogiri))
(synopsis (synopsis