gnu: ruby-nokogumbo: Update to 1.4.7-1.
* gnu/packages/ruby.scm (ruby-nokogumbo): Update to 1.4.7-1.
This commit is contained in:
parent
59884b71e3
commit
f1ae7c6218
|
@ -2511,67 +2511,68 @@ multibyte strings, internationalization, time zones, and testing.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public ruby-nokogumbo
|
(define-public ruby-nokogumbo
|
||||||
(package
|
(let ((commit "fb51ff299a1c34346837580b6d1d9a60fadf5dbd"))
|
||||||
(name "ruby-nokogumbo")
|
(package
|
||||||
(version "1.4.6")
|
(name "ruby-nokogumbo")
|
||||||
(source (origin
|
(version (string-append "1.4.7-1." (string-take commit 8)))
|
||||||
;; We use the git reference, because there's no Rakefile in the
|
(source (origin
|
||||||
;; published gem and the tarball on Github is outdated.
|
;; We use the git reference, because there's no Rakefile in the
|
||||||
(method git-fetch)
|
;; published gem and the tarball on Github is outdated.
|
||||||
(uri (git-reference
|
(method git-fetch)
|
||||||
(url "https://github.com/rubys/nokogumbo.git")
|
(uri (git-reference
|
||||||
(commit "d56f954d20a")))
|
(url "https://github.com/rubys/nokogumbo.git")
|
||||||
(file-name (string-append name "-" version "-checkout"))
|
(commit "d56f954d20a")))
|
||||||
(sha256
|
(file-name (string-append name "-" version "-checkout"))
|
||||||
(base32
|
(sha256
|
||||||
"0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
|
(base32
|
||||||
(build-system ruby-build-system)
|
"0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
|
||||||
(arguments
|
(build-system ruby-build-system)
|
||||||
`(#:modules ((guix build ruby-build-system)
|
(arguments
|
||||||
(guix build utils)
|
`(#:modules ((guix build ruby-build-system)
|
||||||
(ice-9 rdelim))
|
(guix build utils)
|
||||||
#:phases
|
(ice-9 rdelim))
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-before 'build 'build-gemspec
|
(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-before 'build 'build-gemspec
|
||||||
(substitute* "Rakefile"
|
(lambda _
|
||||||
;; Build Makefile even without a copy of gumbo-parser sources
|
(substitute* "Rakefile"
|
||||||
(("'gumbo-parser/src',") "")
|
;; Build Makefile even without a copy of gumbo-parser sources
|
||||||
;; We don't bundle gumbo-parser sources
|
(("'gumbo-parser/src',") "")
|
||||||
(("'gumbo-parser/src/\\*',") "")
|
;; We don't bundle gumbo-parser sources
|
||||||
(("'gumbo-parser/visualc/include/\\*',") "")
|
(("'gumbo-parser/src/\\*',") "")
|
||||||
;; The definition of SOURCES will be cut in gemspec, and
|
(("'gumbo-parser/visualc/include/\\*',") "")
|
||||||
;; "FileList" will be undefined.
|
;; The definition of SOURCES will be cut in gemspec, and
|
||||||
(("SOURCES \\+ FileList\\[")
|
;; "FileList" will be undefined.
|
||||||
"['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', "))
|
(("SOURCES \\+ FileList\\[")
|
||||||
|
"['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', "))
|
||||||
|
|
||||||
;; Copy the Rakefile and cut out the gemspec.
|
;; Copy the Rakefile and cut out the gemspec.
|
||||||
(copy-file "Rakefile" ".gemspec")
|
(copy-file "Rakefile" ".gemspec")
|
||||||
(with-atomic-file-replacement ".gemspec"
|
(with-atomic-file-replacement ".gemspec"
|
||||||
(lambda (in out)
|
(lambda (in out)
|
||||||
(let loop ((line (read-line in 'concat))
|
(let loop ((line (read-line in 'concat))
|
||||||
(skipping? #t))
|
(skipping? #t))
|
||||||
(if (eof-object? line)
|
(if (eof-object? line)
|
||||||
#t
|
#t
|
||||||
(let ((skip-next? (if skipping?
|
(let ((skip-next? (if skipping?
|
||||||
(not (string-prefix? "SPEC =" line))
|
(not (string-prefix? "SPEC =" line))
|
||||||
(string-prefix? "end" line))))
|
(string-prefix? "end" line))))
|
||||||
(when (or (not skipping?)
|
(when (or (not skipping?)
|
||||||
(and skipping? (not skip-next?)))
|
(and skipping? (not skip-next?)))
|
||||||
(format #t "~a" line)
|
(format #t "~a" line)
|
||||||
(display line out))
|
(display line out))
|
||||||
(loop (read-line in 'concat) skip-next?))))))
|
(loop (read-line in 'concat) skip-next?))))))
|
||||||
#t)))))
|
#t)))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("gumbo-parser" ,gumbo-parser)))
|
`(("gumbo-parser" ,gumbo-parser)))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("ruby-nokogiri" ,ruby-nokogiri)))
|
`(("ruby-nokogiri" ,ruby-nokogiri)))
|
||||||
(synopsis "Ruby bindings to the Gumbo HTML5 parser")
|
(synopsis "Ruby bindings to the Gumbo HTML5 parser")
|
||||||
(description
|
(description
|
||||||
"Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
|
"Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
|
||||||
access the result as a Nokogiri parsed document.")
|
access the result as a Nokogiri parsed document.")
|
||||||
(home-page "https://github.com/rubys/nokogumbo/")
|
(home-page "https://github.com/rubys/nokogumbo/")
|
||||||
(license license:asl2.0)))
|
(license license:asl2.0))))
|
||||||
|
|
||||||
(define-public ruby-sanitize
|
(define-public ruby-sanitize
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in New Issue