From patchwork Fri Jun 24 11:08:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Fitzhenry X-Patchwork-Id: 40286 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3157027BBEA; Fri, 24 Jun 2022 12:10:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1E79927BBE9 for ; Fri, 24 Jun 2022 12:10:14 +0100 (BST) Received: from localhost ([::1]:37410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4hCX-0007sD-8Z for patchwork@mira.cbaines.net; Fri, 24 Jun 2022 07:10:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4hCN-0007rS-8K for guix-patches@gnu.org; Fri, 24 Jun 2022 07:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4hCM-0001mc-WB for guix-patches@gnu.org; Fri, 24 Jun 2022 07:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4hCM-0003eD-MJ for guix-patches@gnu.org; Fri, 24 Jun 2022 07:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55997] [PATCH staging v2 1/5] gnu: Add ruby-hydra-minimal. Resent-From: Tom Fitzhenry Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jun 2022 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55997@debbugs.gnu.org Cc: Tom Fitzhenry Received: via spool by 55997-submit@debbugs.gnu.org id=B55997.165606895013916 (code B ref 55997); Fri, 24 Jun 2022 11:10:02 +0000 Received: (at 55997) by debbugs.gnu.org; 24 Jun 2022 11:09:10 +0000 Received: from localhost ([127.0.0.1]:41129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4hBI-0003bU-V1 for submit@debbugs.gnu.org; Fri, 24 Jun 2022 07:09:09 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4hBH-0003bE-7h for 55997@debbugs.gnu.org; Fri, 24 Jun 2022 07:08:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3825D5C020D; Fri, 24 Jun 2022 07:08:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 24 Jun 2022 07:08:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= tom-fitzhenry.me.uk; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1656068930; x=1656155330; bh=7CFzVTntzlJW8Fqndw6lIkd3CVMprjsaBrX FWKElGFY=; b=J72m9U0IXgoZ6j8DMu8/6pOlXxYOo9gfFcqW/q44H4rFw8MyHBl yuoMEdCLYSh6gc9yEan009OIAN+XCxZVYh4PZoO7O/H/BM7xo/dp1FLiKuqtVDC8 ugy8dqsb7oiTXQrdsLKeCjDIr5Iw/VpmAaAKB4y8CyoJtXPa531Tix14gyG1vEE/ NfrjrQ9CiacGt4RnHlOFQHcbzUCx4x75WH2b+GiBnz6mfgg5l4ULbKS/AfWAw0R+ L+pjTFn+EQHuXBBuX6V2NQm3T7XSFTb+NZt3d+sv0B7Tb4vaS0qBN2z8TW148Q8e LAi54tDjDV45Cuo8+WHyW+SKp2FM2WRWJSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1656068930; x=1656155330; bh=7CFzVTntzlJW8 Fqndw6lIkd3CVMprjsaBrXFWKElGFY=; b=xnEnUSZH5OT4tltqhEURtgmmDmlYD am7gEPgkZUp5Og+CQgB94OaVxD7nUN7h1abJPu1FFMwjpPxqFrkVqSFs9MmqdkQ8 wur63MICweebg3CncrI+8uTRpcbeUppLYHlqWyYIVjgrShfLdwfO6OnjW3fkCzdL fwvhgbhSr/Q4YY/AhGTW02/bH9XKXZ5pJ4fqFtwxfBWMeQqeECNJK4ElhdiMISxJ 7bFtDEmXGfHyDl0JpNg7vRIYpCZY51S0IwkKtf7lM4xFOaYt2QOEbk+L204pYHXl lrkuQpLcWtQzmd1OjOL/nzefgN3OgSpLIH+8ATnCNxomC7lMc/Fql1L2g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefledgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvohhmucfhihhtiihhvghnrhihuceothhomhesthhomhdq fhhithiihhgvnhhrhidrmhgvrdhukheqnecuggftrfgrthhtvghrnhepvdehfeevtdejff efhfejudelhfefudehieegveffgeejvdetgeeuleehgefgfeeinecuffhomhgrihhnpehg nhhurdhorhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehtohhmsehtohhmqdhfihhtiihhvghnrhihrdhmvgdr uhhk X-ME-Proxy: Feedback-ID: iefc945ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Jun 2022 07:08:48 -0400 (EDT) From: Tom Fitzhenry Date: Fri, 24 Jun 2022 21:08:34 +1000 Message-Id: <20220624110838.21580-2-tom@tom-fitzhenry.me.uk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624110838.21580-1-tom@tom-fitzhenry.me.uk> References: <20220624110838.21580-1-tom@tom-fitzhenry.me.uk> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/local.mk (dist_patch_DATA): Add ruby-hydra-minimal-no-byebug.patch. * gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch: New file. * gnu/packages/ruby.scm (ruby-hydra): Refactor to inherit from ruby-hydra-minimal. (ruby-hydra-minimal): New variable. --- gnu/local.mk | 1 + .../ruby-hydra-minimal-no-byebug.patch | 11 ++++++ gnu/packages/ruby.scm | 36 +++++++++++++------ 3 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch diff --git a/gnu/local.mk b/gnu/local.mk index f8ccbd34ec..6653ff0240 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1767,6 +1767,7 @@ dist_patch_DATA = \ %D%/packages/patches/rocm-comgr-3.1.0-dependencies.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \ + %D%/packages/patches/ruby-hydra-minimal-no-byebug.patch \ %D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \ %D%/packages/patches/ruby-sanitize-system-libxml.patch \ %D%/packages/patches/rustc-1.39.0-src.patch \ diff --git a/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch b/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch new file mode 100644 index 0000000000..7b338ca03e --- /dev/null +++ b/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch @@ -0,0 +1,11 @@ +Description: Avoid dependency on byebug to reduce package closure + significantly, see https://issues.guix.gnu.org/55997 +diff --git a/lib/hydra.rb b/lib/hydra.rb +index 29fbad2..6b5058a 100644 +--- a/lib/hydra.rb ++++ b/lib/hydra.rb +@@ -1,4 +1,3 @@ +-require 'byebug' unless ENV['RACK_ENV'] == "production" + require 'pp' + + module CoreExt diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 800ab194fe..4c66e14a68 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3124,24 +3124,40 @@ (define-public ruby-hashdiff (home-page "https://github.com/liufengyun/hashdiff") (license license:expat))) -(define-public ruby-hydra +(define-public ruby-hydra-minimal ;; No releases yet. (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525") (revision "0")) (package - (name "ruby-hydra") + (name "ruby-hydra-minimal") (version (git-version "0.0" revision commit)) (home-page "https://github.com/hyphenation/hydra") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit commit))) (file-name (git-file-name name version)) + ;; byebug is a non-essential debugging utility that brings in + ;; many dependencies. + (patches (search-patches "ruby-hydra-minimal-no-byebug.patch")) (sha256 (base32 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f")))) (build-system ruby-build-system) (arguments - '(#:phases (modify-phases %standard-phases + ;; Avoid rspec dependency. + '(#:tests? #f)) + (synopsis "Ruby hyphenation patterns") + (description + "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns. +It is a low-dependency variant of ruby-hydra.") + (license license:expat)))) + +(define-public ruby-hydra + (package + (inherit ruby-hydra-minimal) + (name "ruby-hydra") + (arguments + '(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-files-writable (lambda _ (for-each make-file-writable (find-files ".")) @@ -3149,14 +3165,12 @@ (define-public ruby-hydra (replace 'check (lambda _ (invoke "rspec")))))) - (native-inputs - (list ruby-rspec)) - (propagated-inputs - (list ruby-byebug)) - (synopsis "Ruby hyphenation patterns") - (description - "ruby-hydra is a Ruby library for working with hyphenation patterns.") - (license license:expat)))) + (native-inputs + (list ruby-rspec)) + (propagated-inputs + (list ruby-byebug)) + (description + "ruby-hydra is a Ruby library for working with hyphenation patterns."))) (define-public ruby-shindo (package