me
/
guix
Archived
1
0
Fork 0

gnu: ronn-ng: Fix build.

* gnu/packages/groff.scm (ronn-ng)[arguments]: Add 'patch-test phase and
update style.
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
1 changed files with 28 additions and 21 deletions

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,27 +230,33 @@ 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
(add-after 'extract-gemspec 'fix-gemspec-mustache #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'patch-test
(substitute* "ronn-ng.gemspec" (lambda _
(("(<mustache>.freeze.*~>).*(\".*$)" all start end) ;; TODO This should be removed once the upstream fix is released
(string-append start " 1.0" end))) ;; https://github.com/apjanke/ronn-ng/commit/e194bf62b1d0c0828cc83405e60dc5ece829e62f
#t)) (substitute* "test/test_ronn_document.rb"
(add-after 'wrap 'wrap-program (("YAML\\.load\\(@doc\\.to_yaml\\)")
(lambda* (#:key outputs #:allow-other-keys) "YAML.load(@doc.to_yaml, permitted_classes: [Time])"))))
(let ((prog (string-append (assoc-ref %outputs "out") "/bin/ronn"))) (add-after 'extract-gemspec 'fix-gemspec-mustache
(wrap-program prog (lambda _
`("PATH" ":" suffix ,(map (substitute* "ronn-ng.gemspec"
(lambda (exp_inpt) (("(<mustache>.freeze.*~>).*(\".*$)" all start end)
(string-append (string-append start " 1.0" end)))))
(assoc-ref %build-inputs exp_inpt) (add-after 'wrap 'wrap-program
"/bin")) (lambda* (#:key outputs #:allow-other-keys)
'("ruby-kramdown" (let ((prog (string-append (assoc-ref %outputs "out") "/bin/ronn")))
"ruby-mustache" (wrap-program prog
"ruby-nokogiri"))))) `("PATH" ":" suffix ,(map
#t))))) (lambda (exp_inpt)
(string-append
(assoc-ref %build-inputs exp_inpt)
"/bin"))
'("ruby-kramdown"
"ruby-mustache"
"ruby-nokogiri"))))))))))
(inputs (inputs
(list ruby-kramdown ruby-mustache ruby-nokogiri)) (list ruby-kramdown ruby-mustache ruby-nokogiri))
(synopsis (synopsis