all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: guix-devel@gnu.org
Subject: video stream of updating newsboat to 2.20.1
Date: Sun, 19 Jul 2020 20:36:37 +0300	[thread overview]
Message-ID: <20200719173637.GD7307@E5400> (raw)


[-- 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 --]

             reply	other threads:[~2020-07-19 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 17:36 Efraim Flashner [this message]
2020-07-19 19:25 ` video stream of updating newsboat to 2.20.1 Bonface M. K.
2020-07-19 22:42 ` Joshua Branson
2020-07-27 10:49   ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=20200719173637.GD7307@E5400 \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    /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 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.