[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
38/45: gnu: Add ruby-anystyle.
From: |
guix-commits |
Subject: |
38/45: gnu: Add ruby-anystyle. |
Date: |
Thu, 4 Aug 2022 06:07:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3b017b9400978a7f351fd8a75e33d1eefb079d08
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Mon Jul 25 08:16:30 2022 -0400
gnu: Add ruby-anystyle.
* gnu/packages/ruby.scm (ruby-anystyle): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/ruby.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 6b312d1b4d..39d8d9e1ef 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -13480,3 +13480,74 @@ the power of the built-in @code{OptionParser}.")
(description
"This gem provides parser dictionary data for AnyStyle.")
(license license:bsd-2)))
+
+(define-public ruby-anystyle
+ (let ((commit "50f1dd547d28ab4b830e45d70e840cb1898a37b0")
+ (revision "1"))
+ ;; Releases point to specific commits, but recent releases haven't been
+ ;; tagged in Git. Meanwhile, the rubygems archive lacks tests.
+ (package
+ (name "ruby-anystyle")
+ (version (git-version "1.3.14" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inukshuk/anystyle")
+ (commit commit)))
+ (sha256
+ (base32
+ "0f4qcrywl1kl6qysn24lj3yp85ln4i7za7b7ld2fglyzwcggxwb0"))
+ (snippet
+ ;; There is an optional dependency on
+ ;; <https://github.com/feedbackmine/language_detector>, which
+ ;; seems like it was intended to be free software, but
+ ;; doesn't have a clear license statement. Maybe someone can
+ ;; do more sleuthing, or else find a replacement? See also
+ ;; <https://github.com/inukshuk/anystyle/issues/186>. For
+ ;; now, patch it out, but leave a pointer to follow up.
+ #~(begin
+ (use-modules (guix build utils))
+ (substitute* "Gemfile"
+ (("gem 'language_detector', github: '[^']*'" orig)
+ (string-append "# " orig " # unclear license")))
+ (substitute* "spec/anystyle/parser_spec.rb"
+ (("language: 'en'," orig)
+ (string-append "# " orig " # no lanugage_detector")))))
+ (file-name (git-file-name name version))))
+ (build-system ruby-build-system)
+ (propagated-inputs
+ (list ruby-anystyle-data
+ ruby-bibtex-ruby
+ ruby-namae
+ ruby-wapiti))
+ (native-inputs
+ (list ruby-byebug
+ ruby-citeproc
+ ruby-edtf
+ ruby-rspec
+ ruby-unicode-scripts))
+ (arguments
+ (list
+ #:test-target "spec"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'extract-gemspec 'avoid-bundler
+ (lambda args
+ (substitute* "Rakefile"
+ (("require 'bundler" orig)
+ (string-append "# " orig " # patched for Guix"))
+ (("Bundler\\.setup" orig)
+ (string-append "true # " orig " # patched for Guix")))))
+ (add-after 'replace-git-ls-files 'replace-another-git-ls-files
+ (lambda args
+ (substitute* "anystyle.gemspec"
+ (("`git ls-files spec`")
+ "`find spec -type f | sort`")))))))
+ (home-page "https://anystyle.io")
+ (synopsis "Fast and smart citation reference parsing (Ruby library)")
+ (description
+ "AnyStyle is a very fast and smart parser for academic reference lists
+and bibliographies. AnyStyle uses powerful machine learning heuristics based
+on Conditional Random Fields and aims to make it easy to train the model with
+data that is relevant to your parsing needs.")
+ (license license:bsd-2))))
- 39/45: gnu: Add anystyle., (continued)
- 39/45: gnu: Add anystyle., guix-commits, 2022/08/04
- 18/45: gnu: clang-toolchain-8: Use libomp-8., guix-commits, 2022/08/04
- 33/45: gnu: Add ruby-unicode-scripts., guix-commits, 2022/08/04
- 29/45: gnu: Add ruby-link-header., guix-commits, 2022/08/04
- 20/45: gnu: clang-toolchain-7: Use libomp-7., guix-commits, 2022/08/04
- 40/45: gnu: ruby-anystyle-data: Don't write to installed gem., guix-commits, 2022/08/04
- 45/45: gnu: Add python-h5netcdf., guix-commits, 2022/08/04
- 31/45: gnu: Add ruby-rdf-vocab., guix-commits, 2022/08/04
- 08/45: gnu: libomp-13: Reference llvm-13 version string., guix-commits, 2022/08/04
- 21/45: gnu: Add libomp-6., guix-commits, 2022/08/04
- 38/45: gnu: Add ruby-anystyle.,
guix-commits <=
- 01/45: guix build: Print hints when -s or --target is passed an invalid string., guix-commits, 2022/08/04
- 32/45: gnu: Add ruby-bibtex-ruby., guix-commits, 2022/08/04
- 28/45: gnu: Add ruby-latex-decode., guix-commits, 2022/08/04
- 04/45: gnu: Add barony., guix-commits, 2022/08/04
- 17/45: gnu: Add libomp-8., guix-commits, 2022/08/04
- 03/45: environment: Report "command not found" from the child process., guix-commits, 2022/08/04
- 27/45: gnu: Add ruby-ritex., guix-commits, 2022/08/04
- 42/45: gnu: anystyle: Add tests for dictionary adapters., guix-commits, 2022/08/04
- 30/45: gnu: Add ruby-rdf., guix-commits, 2022/08/04
- 22/45: gnu: clang-toolchain-6: Use libomp-6., guix-commits, 2022/08/04