all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
@ 2020-07-22 18:09 Efraim Flashner
  2020-07-23 11:49 ` Jakub Kądziołka
  0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2020-07-22 18:09 UTC (permalink / raw)
  To: 42477; +Cc: Efraim Flashner

* gnu/packages/syndication.scm (newsboat): Update to 2.20.1.
[source]: Add snippet to loosen version requirement on crate dependency.
[build-system]: Switch to cargo-build-system.
[native-inputs]: Remove asciidoc, add openssl, asciidoctor.
[arguments]: Add gnu-build-system module. Add vendor-dir, cargo-inputs,
cargo-development-inputs fields. Don't delete 'configure phase. Add
custom 'dont-vendor-self-phase. Replace 'build, 'check, 'install phases
with gnu counterparts.
(newsboat-2.13): New variable.
---

This is the patch from when I recorded some of my package updating on
Guix. I'm sending it to guix-patches instead of just pushing it because
I wanted to make sure I did the right thing with the variable names.

---
 gnu/packages/syndication.scm | 110 ++++++++++++++++++++++++++++++-----
 1 file changed, 97 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index 3d858240b7..b8665fb9c3 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -22,11 +22,13 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix download)
   #:use-module (guix packages)
+  #:use-module (guix build-system cargo)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages crates-io)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
@@ -40,15 +42,18 @@
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (srfi srfi-1))
 
 (define-public newsboat
   (package
     (name "newsboat")
-    (version "2.13")
+    (version "2.20.1")
     (source
      (origin
        (method url-fetch)
@@ -56,13 +61,20 @@
                            "/newsboat-" version ".tar.xz"))
        (sha256
         (base32
-         "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
-    (build-system gnu-build-system)
+         "0rimjikni96m52vhymgsg1b9g99af6ggyzd1lpvhgqsznxwj0y42"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "rust/libnewsboat/Cargo.toml"
+             (("= 1.0.17") "1.0.17"))
+           #t))))
+    (build-system cargo-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)
+       ("openssl" ,openssl)
        ("pkg-config" ,pkg-config)
        ;; For building documentation.
-       ("asciidoc" ,asciidoc)))
+       ("asciidoctor" ,ruby-asciidoctor)))
     (inputs
      `(("curl" ,curl)
        ("json-c" ,json-c-0.13)
@@ -71,15 +83,58 @@
        ("stfl" ,stfl)
        ("sqlite" ,sqlite)))
     (arguments
-     '(#:phases
+     `(#:modules ((guix build cargo-build-system)
+                  (guix build utils)
+                  ((guix build gnu-build-system) #:prefix gnu:))
+       #:vendor-dir "vendor"
+       #:cargo-inputs
+       (("rust-backtrace" ,rust-backtrace-0.3)
+        ("rust-bitflags" ,rust-bitflags-1)
+        ("rust-chrono" ,rust-chrono-0.4)
+        ("rust-clap" ,rust-clap-2)
+        ("rust-curl-sys" ,rust-curl-sys-0.4)
+        ("rust-dirs" ,rust-dirs-2.0)
+        ("rust-gettext-rs" ,rust-gettext-rs-0.4)
+        ("rust-gettext-sys" ,rust-gettext-sys-0.19)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-libz-sys" ,rust-libz-sys-1.0)
+        ("rust-natord" ,rust-natord-1.0)
+        ("rust-nom" ,rust-nom-5)
+        ("rust-once-cell" ,rust-once-cell-1.2)
+        ("rust-percent-encoding" ,rust-percent-encoding-2.1)
+        ("rust-rand" ,rust-rand-0.6)
+        ("rust-smallvec" ,rust-smallvec-0.6)
+        ("rust-url" ,rust-url-2.1)
+        ("rust-unicode-width" ,rust-unicode-width-0.1)
+        ("rust-xdg" ,rust-xdg-2.2))
+       #:cargo-development-inputs
+       (("rust-tempfile" ,rust-tempfile-3)
+        ("rust-proptest" ,rust-proptest-0.9)
+        ("rust-section-testing" ,rust-section-testing-0.0))
+       #:phases
        (modify-phases %standard-phases
-         (delete 'configure)            ; no configure script
-         (add-after 'build 'build-documentation
-           (lambda _
-             (invoke "make" "doc"))))
-       #:make-flags
-       (list (string-append "prefix=" (assoc-ref %outputs "out")))
-       #:test-target "test"))
+         (add-after 'configure 'dont-vendor-self
+           (lambda* (#:key vendor-dir #:allow-other-keys)
+             ;; Don't keep the whole tarball in the vendor directory
+             (delete-file-recursively
+               (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
+             #t))
+         (replace 'build
+           (lambda* args
+             ((assoc-ref gnu:%standard-phases 'build)
+              #:make-flags
+              (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
+         (replace 'check
+           (lambda* args
+             ((assoc-ref gnu:%standard-phases 'check)
+              #:test-target "test"
+              #:make-flags
+              (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
+         (replace 'install
+           (lambda* args
+             ((assoc-ref gnu:%standard-phases 'install)
+              #:make-flags
+              (list (string-append "prefix=" (assoc-ref %outputs "out")))))))))
     (native-search-paths
      ;; Newsboat respects CURL_CA_BUNDLE.
      (package-native-search-paths curl))
@@ -96,6 +151,35 @@ file system, and many more features.")
     (license (list license:gpl2+        ; filter/*
                    license:expat))))    ; everything else
 
+(define-public newsboat-2.13
+  (package
+    (inherit newsboat)
+    (version "2.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://newsboat.org/releases/" version
+                           "/newsboat-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(,@(fold alist-delete (package-native-inputs newsboat)
+               '("asciidoctor" "openssl"))
+       ;; For building documentation.
+       ("asciidoc" ,asciidoc)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (add-after 'build 'build-documentation
+           (lambda _
+             (invoke "make" "doc"))))
+       #:make-flags
+       (list (string-append "prefix=" (assoc-ref %outputs "out")))
+       #:test-target "test"))))
+
 (define-public liferea
   (package
     (name "liferea")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-22 18:09 [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1 Efraim Flashner
@ 2020-07-23 11:49 ` Jakub Kądziołka
  2020-07-23 11:59   ` Efraim Flashner
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kądziołka @ 2020-07-23 11:49 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 42477

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

On Wed, Jul 22, 2020 at 09:09:16PM +0300, Efraim Flashner wrote:
> * gnu/packages/syndication.scm (newsboat): Update to 2.20.1.
> [source]: Add snippet to loosen version requirement on crate dependency.
> [build-system]: Switch to cargo-build-system.
> [native-inputs]: Remove asciidoc, add openssl, asciidoctor.
> [arguments]: Add gnu-build-system module. Add vendor-dir, cargo-inputs,
> cargo-development-inputs fields. Don't delete 'configure phase. Add
> custom 'dont-vendor-self-phase. Replace 'build, 'check, 'install phases
> with gnu counterparts.
> (newsboat-2.13): New variable.

Efraim,

I can't help but wonder - what's the motivation here for keeping the
older version around? I think a comment above the definition would be
nice.

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-23 11:49 ` Jakub Kądziołka
@ 2020-07-23 11:59   ` Efraim Flashner
  2020-07-23 13:19     ` Jakub Kądziołka
  0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2020-07-23 11:59 UTC (permalink / raw)
  To: Jakub Kądziołka; +Cc: 42477

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

On Thu, Jul 23, 2020 at 01:49:59PM +0200, Jakub Kądziołka wrote:
> On Wed, Jul 22, 2020 at 09:09:16PM +0300, Efraim Flashner wrote:
> > * gnu/packages/syndication.scm (newsboat): Update to 2.20.1.
> > [source]: Add snippet to loosen version requirement on crate dependency.
> > [build-system]: Switch to cargo-build-system.
> > [native-inputs]: Remove asciidoc, add openssl, asciidoctor.
> > [arguments]: Add gnu-build-system module. Add vendor-dir, cargo-inputs,
> > cargo-development-inputs fields. Don't delete 'configure phase. Add
> > custom 'dont-vendor-self-phase. Replace 'build, 'check, 'install phases
> > with gnu counterparts.
> > (newsboat-2.13): New variable.
> 
> Efraim,
> 
> I can't help but wonder - what's the motivation here for keeping the
> older version around? I think a comment above the definition would be
> nice.

The older one is the last version that builds without rust. I can add a
comment about why it's still there.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-23 11:59   ` Efraim Flashner
@ 2020-07-23 13:19     ` Jakub Kądziołka
  2020-07-23 14:26       ` Efraim Flashner
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kądziołka @ 2020-07-23 13:19 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 42477

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

On Thu, Jul 23, 2020 at 02:59:25PM +0300, Efraim Flashner wrote:
> On Thu, Jul 23, 2020 at 01:49:59PM +0200, Jakub Kądziołka wrote:
> > On Wed, Jul 22, 2020 at 09:09:16PM +0300, Efraim Flashner wrote:
> > > * gnu/packages/syndication.scm (newsboat): Update to 2.20.1.
> > > [source]: Add snippet to loosen version requirement on crate dependency.
> > > [build-system]: Switch to cargo-build-system.
> > > [native-inputs]: Remove asciidoc, add openssl, asciidoctor.
> > > [arguments]: Add gnu-build-system module. Add vendor-dir, cargo-inputs,
> > > cargo-development-inputs fields. Don't delete 'configure phase. Add
> > > custom 'dont-vendor-self-phase. Replace 'build, 'check, 'install phases
> > > with gnu counterparts.
> > > (newsboat-2.13): New variable.
> > 
> > Efraim,
> > 
> > I can't help but wonder - what's the motivation here for keeping the
> > older version around? I think a comment above the definition would be
> > nice.
> 
> The older one is the last version that builds without rust. I can add a
> comment about why it's still there.

I gathered as much. I don't understand, though, why a rust-less version
is valuable.

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-23 13:19     ` Jakub Kądziołka
@ 2020-07-23 14:26       ` Efraim Flashner
  2020-07-23 18:17         ` Jakub Kądziołka
  0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2020-07-23 14:26 UTC (permalink / raw)
  To: Jakub Kądziołka; +Cc: 42477

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

On Thu, Jul 23, 2020 at 03:19:24PM +0200, Jakub Kądziołka wrote:
> On Thu, Jul 23, 2020 at 02:59:25PM +0300, Efraim Flashner wrote:
> > On Thu, Jul 23, 2020 at 01:49:59PM +0200, Jakub Kądziołka wrote:
> > > 
> > > Efraim,
> > > 
> > > I can't help but wonder - what's the motivation here for keeping the
> > > older version around? I think a comment above the definition would be
> > > nice.
> > 
> > The older one is the last version that builds without rust. I can add a
> > comment about why it's still there.
> 
> I gathered as much. I don't understand, though, why a rust-less version
> is valuable.
> 

Oh, that's because there are architectures where rust either doesn't
build (like i686-linux) or it builds incredibly slowly (aarch64).


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-23 14:26       ` Efraim Flashner
@ 2020-07-23 18:17         ` Jakub Kądziołka
  2020-07-26 16:21           ` bug#42477: " Efraim Flashner
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kądziołka @ 2020-07-23 18:17 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 42477

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

On Thu, Jul 23, 2020 at 05:26:39PM +0300, Efraim Flashner wrote:
> On Thu, Jul 23, 2020 at 03:19:24PM +0200, Jakub Kądziołka wrote:
> > On Thu, Jul 23, 2020 at 02:59:25PM +0300, Efraim Flashner wrote:
> > > On Thu, Jul 23, 2020 at 01:49:59PM +0200, Jakub Kądziołka wrote:
> > > > 
> > > > Efraim,
> > > > 
> > > > I can't help but wonder - what's the motivation here for keeping the
> > > > older version around? I think a comment above the definition would be
> > > > nice.
> > > 
> > > The older one is the last version that builds without rust. I can add a
> > > comment about why it's still there.
> > 
> > I gathered as much. I don't understand, though, why a rust-less version
> > is valuable.
> > 
> 
> Oh, that's because there are architectures where rust either doesn't
> build (like i686-linux) or it builds incredibly slowly (aarch64).

Ah, okay then! For some reason I totally forgot to consider non-x64. I
will try to improve this situation, but in the meantime it's indeed a
good idea.

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#42477: [PATCH] gnu: newsboat: Update to 2.20.1.
  2020-07-23 18:17         ` Jakub Kądziołka
@ 2020-07-26 16:21           ` Efraim Flashner
  0 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2020-07-26 16:21 UTC (permalink / raw)
  To: Jakub Kądziołka; +Cc: 42477-done

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

On Thu, Jul 23, 2020 at 08:17:33PM +0200, Jakub Kądziołka wrote:
> On Thu, Jul 23, 2020 at 05:26:39PM +0300, Efraim Flashner wrote:
> > On Thu, Jul 23, 2020 at 03:19:24PM +0200, Jakub Kądziołka wrote:
> > > On Thu, Jul 23, 2020 at 02:59:25PM +0300, Efraim Flashner wrote:
> > > > On Thu, Jul 23, 2020 at 01:49:59PM +0200, Jakub Kądziołka wrote:
> > > > > 
> > > > > Efraim,
> > > > > 
> > > > > I can't help but wonder - what's the motivation here for keeping the
> > > > > older version around? I think a comment above the definition would be
> > > > > nice.
> > > > 
> > > > The older one is the last version that builds without rust. I can add a
> > > > comment about why it's still there.
> > > 
> > > I gathered as much. I don't understand, though, why a rust-less version
> > > is valuable.
> > > 
> > 
> > Oh, that's because there are architectures where rust either doesn't
> > build (like i686-linux) or it builds incredibly slowly (aarch64).
> 
> Ah, okay then! For some reason I totally forgot to consider non-x64. I
> will try to improve this situation, but in the meantime it's indeed a
> good idea.
> 

Ok. Patch pushed!


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-26 16:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-22 18:09 [bug#42477] [PATCH] gnu: newsboat: Update to 2.20.1 Efraim Flashner
2020-07-23 11:49 ` Jakub Kądziołka
2020-07-23 11:59   ` Efraim Flashner
2020-07-23 13:19     ` Jakub Kądziołka
2020-07-23 14:26       ` Efraim Flashner
2020-07-23 18:17         ` Jakub Kądziołka
2020-07-26 16:21           ` bug#42477: " Efraim Flashner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.