From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YDRBFmiK3mLeDgAAbAwnHQ (envelope-from ) for ; Mon, 25 Jul 2022 14:19:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6PEBFWiK3mJkKQEAG6o9tA (envelope-from ) for ; Mon, 25 Jul 2022 14:19:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0D1BA97B4 for ; Mon, 25 Jul 2022 14:19:52 +0200 (CEST) Received: from localhost ([::1]:49114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFx3v-0000Hu-3T for larch@yhetil.org; Mon, 25 Jul 2022 08:19:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFx3A-0008MR-Bp for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59708) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFx39-0005Oh-SY for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFx39-0002yB-ON for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56759] [PATCH 15/20] gnu: Add ruby-anystyle. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 12:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56759 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56759@debbugs.gnu.org Cc: Philip McGrath Received: via spool by 56759-submit@debbugs.gnu.org id=B56759.165875151911299 (code B ref 56759); Mon, 25 Jul 2022 12:19:03 +0000 Received: (at 56759) by debbugs.gnu.org; 25 Jul 2022 12:18:39 +0000 Received: from localhost ([127.0.0.1]:49440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2k-0002w3-CT for submit@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:38 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:44548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2W-0002v3-2D for 56759@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:25 -0400 Received: by mail-qk1-f180.google.com with SMTP id b25so8405425qka.11 for <56759@debbugs.gnu.org>; Mon, 25 Jul 2022 05:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p7CbS7TTJuMyZYk1TA2sESgQ7y6tjc89kLkM+qtGXDI=; b=VF6yR4zJhqnh/BrQY0utMyXxBpU5OmCw/neF7ukDMxoVxJ9XSy56I1jJ/fEcSVFY16 8iBq3qUqySjI+yREmAawto5gvLwOurYfMUGg1hBIAwnTzg7JoNJZpabn209vEAGZElIA Jykp6VP/C4kEJ01zr0xM8Us6cl5Te77vTDO8tELCn8q05Tahfs5KF8WHrzZKQl5DruLm EyBguqPGNp7c88VP1+mcSI5/f0Sp6dunE42ESPw56DKtk5J2i+9H/cv1Eqd+VIT+KgT1 VANRfOinYukF32ZdkGbJXXHMn8GsAmFeYGbdTsSAB28Nh+OEnTNMyYPP+6z9KfK9BJZz NgKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p7CbS7TTJuMyZYk1TA2sESgQ7y6tjc89kLkM+qtGXDI=; b=qbIXTBYz0vWRrd1Ak6YjP3jfwahZ5cT5Gw60XAgGZYxURQKw98xEklsFfC3ZkMNFHb ACws18g3ngfeKn0q5r2p4riZ+IUl1KSwPCZePLS6Tzxf21psEkaGBc4lUwIHEmNz3V35 pC/X7fBETbysH5TBKYsZTZ7zgWC0cswBa8R1+tuifVW1eoRYcm8UkZtJa/L5Xoo1ygam 0cOOjutCwUIEeP78uXHAzcSbOyajQ/PMg0ew4sgDaqDTQGYV2hMA+qtmbfUBtghL9AX5 HeEfM4Abeslzr8Rx4+Khjy34GIGpKrSqAjzmyDaBxEXvCvIyHXWfBVBTUo02mhYvVVck 47Qg== X-Gm-Message-State: AJIora8QQoh8QCdMmjMZ/2F0aLNcMRjf0x8wZoeaYtBqYC6KeMv2uJLp tz+G7pTj3HH1yo2SzzKQyG2HI2yd4G8oM+pD X-Google-Smtp-Source: AGRyM1s5GsgiQ8/DMHfzqvPJ+JRzkari2YT3+xc9i7pXiRGYe6qrzW892GoLGC3rw0w/FevQyFAx8g== X-Received: by 2002:ae9:f307:0:b0:6b5:bf6c:bd23 with SMTP id p7-20020ae9f307000000b006b5bf6cbd23mr8821043qkg.168.1658751498437; Mon, 25 Jul 2022 05:18:18 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x27-20020a05620a0b5b00b006b5e43466ebsm8703020qkg.59.2022.07.25.05.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:18:18 -0700 (PDT) From: Philip McGrath Date: Mon, 25 Jul 2022 08:16:30 -0400 Message-Id: <6dea4f2c9c4e4cf182f48bac204e3f4c8a10967b.1658750358.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658751592; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=p7CbS7TTJuMyZYk1TA2sESgQ7y6tjc89kLkM+qtGXDI=; b=SHG/3w/Fhwk5vbZeGDfQElXPS+PK/AjGkPTpIGv3CKXHN0DJGsXDB1xzfPDO0kt+W+n4BL Bo/JLUHHSJpFb+qR3C4LHq6IT3aJtvrjy6jh2G3AJPpMloqNxfTfbA6cSNtMGbly44j1of /XIqeVrYYKPj7qysoX2Dh9UY1F1WjAFfIH8d7X+RGWM2imkVWUvCKgqPLg1OrEWZVQ0T36 0Lc+W5UXKimtUdl6di2hKu0WNF5DJCeMCYCI/Q4b2ObCyYOf0BLzC9MD/8bbsjiB1HcKxg YclgGGiDBGkgod5K7KdNTxNMoBjO9NOlxyGiksK7bpz/Yh7ij0J0plHgqs5UTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658751592; a=rsa-sha256; cv=none; b=PqyqAczw67kbBHbXpTRC/u2M8uE4ZV79u2pZbccIe71hUq4HltDFnQjtt4XyeytIx1OpsK P+0T+ibaH9NUsxL4H1hkgqv2Hr8+kGCMXmQXiBzhRVMqZV9lhXtJ7FCAtvoDNWKq7y/UU0 co9KesoaDd1qUBuusvP8efsfzJB1O1xJjwAXUyZrFfTYdnaegk4hz5kGenommdhqkLfDcP HmopiuKfYTqrjtFzO1b0U29BNxi4MkX1aezI+uZP5C2k7i58EwWqSxpHOq12crUeMYP5Wu +7o3n/wfNit5JlibW4GA7opOZ7Fx8yCv5GleCVSIxS2bCxVVtsajfVW92uf16g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=VF6yR4zJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=VF6yR4zJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0D1BA97B4 X-Spam-Score: 4.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: +RMdcuNR+iJQ * gnu/packages/ruby.scm (ruby-anystyle): New variable. --- gnu/packages/ruby.scm | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 4efc3d5a41..90f269e247 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -13478,3 +13478,74 @@ (define-public ruby-anystyle-data (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 + ;; , 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 + ;; . 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)))) -- 2.32.0