diff mbox series

[bug#56087] gnu: suckless: add farbfeld and propagate input to sent

Message ID 20220619115925.bcrcjpd7yse2n25t@silvi
State Accepted
Headers show
Series [bug#56087] gnu: suckless: add farbfeld and propagate input to sent | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Gabriel Wicki June 19, 2022, 12:23 p.m. UTC
Hello

Stumbling over the tools in suckless.scm i tried out sent.
Unfortunately just installing sent and giving the example from their
source-repo a try only produced a (somewhat strange) error.

Apparently sent (and probably other suckless tools) rely on suckless'
farbfeld package to handle images and the like, so i packaged it and
propagated the input farbfeld to sent.  This fixes the issue; now
presentations with images work.

I hope my patches are fine.

Best regards
Gabriel


From 55a563f53334c3eaac9cbae79fe33936679ab291 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Sat, 18 Jun 2022 17:00:16 +0200
Subject: [PATCH 1/2] gnu: Add farbfeld.

* gnu/packages/suckless.scm (farbfeld): New variable.
---
 gnu/packages/suckless.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

M June 19, 2022, 1:17 p.m. UTC | #1
Gabriel Wicki schreef op zo 19-06-2022 om 14:23 [+0200]:
> +       `(#:make-flags (list "PREFIX="
> +                            (string-append "DESTDIR=" %output)

Guix does not do staged installation (that's what DESTDIR is for!), so
don't set DESTDIR, instead set PREFIX to #$output instead of DESTDIR
(the difference matters when the compiled program embeds a reference to
its own installation location).  Also, G-exps, because %output isn't
documented IIRC whereas #$output is:

  (arguments
    (list #:make-flags
          #~(list (string-append "PREFIX=" #$output)
                  (string-append "CC=" #$(cc-for-target)))
          #:phases
          #~(modify-phases %standard-phases
              (delete 'configure)
              (delete 'check))))

Also, always add a comment about why tests are skipped (maybe someone
knows how to fix them or the bug they noticed!).

Greetings,
Maxime
M June 19, 2022, 1:18 p.m. UTC | #2
Gabriel Wicki schreef op zo 19-06-2022 om 14:23 [+0200]:
> +  (let ((commit "ab5e3df") (revision "0"))

To avoid collisions, don't abbreviate commits.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 5aa37657b9..fb3af9ad6c 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -1084,3 +1084,35 @@  (define-public sfeed
 various other formats.  There are also some programs and scripts included to
 import and export OPML and to fetch, filter, merge and order feed items.")
     (license license:isc)))
+
+(define-public farbfeld
+  (let ((commit "ab5e3df") (revision "0"))
+    (package
+      (name "farbfeld")
+      (version (git-version "4" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "git://git.suckless.org/farbfeld")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0pkmkvv5ggpzqwqdchd19442x8gh152xy5z1z13ipfznhspsf870"))))
+      (build-system gnu-build-system)
+      (inputs (list libpng libjpeg-turbo))
+      (arguments
+       `(#:make-flags (list "PREFIX="
+                            (string-append "DESTDIR=" %output)
+                            (string-append "CC="
+                                           ,(cc-for-target)))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (delete 'check))))
+      (synopsis "Image format and conversion tools")
+      (description
+       "farbfeld is a lossless image format which is easy to parse,
+pipe and compress.")
+      (home-page "https://git.suckless.org/farbfeld/")
+      (license license:isc))))