unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ian Eure <ian@retrospec.tv>
To: 73429@debbugs.gnu.org
Cc: "André Batista" <nandre@riseup.net>,
	mhw@netris.org, jonathan.brielmaier@web.de,
	"Ian Eure" <ian@retrospec.tv>
Subject: [bug#73429] [PATCH v2 3/3] gnu: librewolf-source: Turn into a procedure.
Date: Mon, 23 Sep 2024 07:47:06 -0700	[thread overview]
Message-ID: <20240923144706.2073-4-ian@retrospec.tv> (raw)
In-Reply-To: <20240923144706.2073-1-ian@retrospec.tv>

This patch changes the `librewolf-source' variable into the
`make-librewolf-source' prodecure.

This procedure accepts a LibreWolf version, source hash, and Firefox source
hash.  The Firefox source version is derived from the provided LibreWolf
version.

This eases package updates, since the hashes are inside the `librewolf'
package, rather than `librewolf-source'; and the version no longer needs to be
specified in three places.

It also removes a blank line between the file header and `define-module'.

* gnu/packages/librewolf.scm (librewolf-source): Turn into a procedure.

Change-Id: I96ab1304acde246c179e7aa5dad9ff621be3de82
---
 gnu/packages/librewolf.scm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index bade479656..6fd0aa51f1 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -40,7 +40,6 @@
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
-
 (define-module (gnu packages librewolf)
   #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module (guix build-system gnu)
@@ -116,12 +115,13 @@ (define (librewolf-source-origin version hash)
 
 (define computed-origin-method (@@ (guix packages) computed-origin-method))
 
-(define librewolf-source
-  (let* ((ff-src (firefox-source-origin "130.0"
-                  "0w4z3fq5zhm63a0wmhvmqrj263bvy962dir25q3z0x5hx6hjawh2"))
+(define* (make-librewolf-source #:key version firefox-hash librewolf-hash)
+  (let* ((ff-src (firefox-source-origin
+                  (car (string-split version #\-))
+                  firefox-hash))
          (lw-src (librewolf-source-origin
-                  "130.0.1-1"
-                  "0f80pihn375bdjhjmmg2v1w96wpn76zb60ycy39wafwh1dnzybrd")))
+                  version
+                  librewolf-hash)))
 
     (origin
       (method computed-origin-method)
@@ -220,7 +220,10 @@ (define-public librewolf
     (version "130.0.1-1")
     (source
      (origin
-      (inherit librewolf-source)
+      (inherit (make-librewolf-source
+                #:version version
+                #:firefox-hash "0w4z3fq5zhm63a0wmhvmqrj263bvy962dir25q3z0x5hx6hjawh2"
+                #:librewolf-hash "0f80pihn375bdjhjmmg2v1w96wpn76zb60ycy39wafwh1dnzybrd"))
       (patches
        (search-patches "librewolf-add-paths-to-rdd-allowlist.patch"))))
     (build-system gnu-build-system)
-- 
2.46.0





  parent reply	other threads:[~2024-09-23 14:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 20:51 [bug#73429] [PATCH 0/3] Update LibreWolf to 130.0.1-1 & nss-rapid to 3.104 [security fixes] Ian Eure
2024-09-22 20:53 ` [bug#73429] [PATCH 1/3] gnu: nss-rapid: Update to 3.104 Ian Eure
2024-09-22 20:53   ` [bug#73429] [PATCH 2/3] gnu: librewolf: Update to 130.0.1-1. [security fixes] Ian Eure
2024-09-24  8:17     ` Andrew Tropin via Guix-patches via
2024-09-22 20:53   ` [bug#73429] [PATCH 3/3] gnu: librewolf-source: Turn into a procedure Ian Eure
2024-09-23 14:47 ` [bug#73429] [PATCH v2 0/3] Update LibreWolf to 130.0.1-1 & nss-rapid to 3.104 [security fixes] Ian Eure
2024-09-23 14:47   ` [bug#73429] [PATCH v2 1/3] gnu: nss-rapid: Update to 3.104 Ian Eure
2024-09-23 14:47   ` [bug#73429] [PATCH v2 2/3] gnu: librewolf: Update to 130.0.1-1. [security fixes] Ian Eure
2024-09-23 14:47   ` Ian Eure [this message]
2024-09-24  7:11   ` bug#73429: [PATCH v2 0/3] Update LibreWolf to 130.0.1-1 & nss-rapid to 3.104 " Andrew Tropin via Guix-patches via
2024-09-27  3:46 ` [bug#73429] closed (Re: [bug#73429] [PATCH v2 0/3] Update LibreWolf to 130.0.1-1 & nss-rapid to 3.104 [security fixes]) John Kehayias via Guix-patches via
2024-09-27 15:52 ` [bug#73429] [PATCH v2 0/3] Update LibreWolf to 130.0.1-1 & nss-rapid to 3.104 [security fixes] not emma via Guix-patches via
2024-09-27 16:14   ` Ian Eure
2024-09-27 16:22     ` not emma via Guix-patches via
2024-09-30 14:27       ` Andrew Tropin via Guix-patches via
2024-10-01 15:51         ` John Kehayias via Guix-patches via
2024-10-02  7:14           ` Andrew Tropin via Guix-patches via
2024-10-03  0:53           ` Ian Eure

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240923144706.2073-4-ian@retrospec.tv \
    --to=ian@retrospec.tv \
    --cc=73429@debbugs.gnu.org \
    --cc=jonathan.brielmaier@web.de \
    --cc=mhw@netris.org \
    --cc=nandre@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).