unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* video stream of updating newsboat to 2.20.1
@ 2020-07-19 17:36 Efraim Flashner
  2020-07-19 19:25 ` Bonface M. K.
  2020-07-19 22:42 ` Joshua Branson
  0 siblings, 2 replies; 4+ messages in thread
From: Efraim Flashner @ 2020-07-19 17:36 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1228 bytes --]

As I mentioned in other places online, I thought it would be nice to try
recording some of my workflow with guix. The video is quite long, an
hour and 20 minutes, and it goes through updating newsboat from 2.13 to
2.20.1 with the change to the cargo-build-system. The audio quality
isn't amazing, I definitely need a better mic, but it was fun and I'd
definitely consider doing it again.

I used simplescreenrecorder for recording, which worked really well. I'm
open to suggestions for encoding flags, the raw video was 1.2GB and
dropped to ~300MB after encoding it for streaming to mp4. I have a
feeling I could do better for size.

I tested the video using VLC on my phone on data, and it started playing
without downloading the whole thing, so it looks like I got the flag
correct for creating a streamable mp4. I'm still encoding it also with
vp9 for a webm but it looks like it's going to be about the same size.

Video: https://flashner.co.il/~efraim/guix-package-newsboat-with-rust.mp4



-- 
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 #1.2: 0001-gnu-newsboat-Update-to-2.20.patch --]
[-- Type: text/plain, Size: 7169 bytes --]

From 6c43f8fbf5e6db72b3968138a0599b039834c69f Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sat, 18 Jul 2020 23:10:32 +0200
Subject: [PATCH] gnu: newsboat: Update to 2.20.

* gnu/packages/syndication.scm (newsboat): Update to 2.20.
[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.
---
 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


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

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

* Re: video stream of updating newsboat to 2.20.1
  2020-07-19 17:36 video stream of updating newsboat to 2.20.1 Efraim Flashner
@ 2020-07-19 19:25 ` Bonface M. K.
  2020-07-19 22:42 ` Joshua Branson
  1 sibling, 0 replies; 4+ messages in thread
From: Bonface M. K. @ 2020-07-19 19:25 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel


Thanks for sharing!

-- 
Bonface M. K. (https://www.bonfacemunyoki.com)
One Divine Emacs To Rule Them All
GPG key = D4F09EB110177E03C28E2FE1F5BBAE1E0392253F


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

* Re: video stream of updating newsboat to 2.20.1
  2020-07-19 17:36 video stream of updating newsboat to 2.20.1 Efraim Flashner
  2020-07-19 19:25 ` Bonface M. K.
@ 2020-07-19 22:42 ` Joshua Branson
  2020-07-27 10:49   ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Joshua Branson @ 2020-07-19 22:42 UTC (permalink / raw)
  To: guix-devel


Thanks for doing this!  I've got some videos* of me creating guix
patches for the cookbook.  It's nice to see a more competent developer
share their work flow! 

* shameless plug:  https://video.hardlimit.com/accounts/joshua_branson/video-channels

--
Joshua Branson
Sent from Emacs and Gnus


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

* Re: video stream of updating newsboat to 2.20.1
  2020-07-19 22:42 ` Joshua Branson
@ 2020-07-27 10:49   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-07-27 10:49 UTC (permalink / raw)
  To: guix-devel

Hi!

Joshua Branson <jbranso@dismail.de> skribis:

> Thanks for doing this!  I've got some videos* of me creating guix
> patches for the cookbook.  It's nice to see a more competent developer
> share their work flow! 
>
> * shameless plug:  https://video.hardlimit.com/accounts/joshua_branson/video-channels

Two very useful initiatives, thumbs up Efraim & Joshua!

Ludo’.



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

end of thread, other threads:[~2020-07-27 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 17:36 video stream of updating newsboat to 2.20.1 Efraim Flashner
2020-07-19 19:25 ` Bonface M. K.
2020-07-19 22:42 ` Joshua Branson
2020-07-27 10:49   ` Ludovic Courtès

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).