Message ID | 20200722180916.29315-1-efraim@flashner.co.il |
---|---|
State | Accepted |
Headers | show |
Series | [bug#42477] gnu: newsboat: Update to 2.20.1. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
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
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.
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
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).
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
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!
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")