guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add nsxiv.


From: guix-commits
Subject: branch master updated: gnu: Add nsxiv.
Date: Sun, 14 Nov 2021 09:20:40 -0500

This is an automated email from the git hooks/post-receive script.

ngz pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 686b940  gnu: Add nsxiv.
686b940 is described below

commit 686b9403a0e6bb76e6a0e1437328555dc2839c6f
Author: Foo Chuan Wei <chuanwei.foo@hotmail.com>
AuthorDate: Sun Oct 31 09:11:29 2021 +0000

    gnu: Add nsxiv.
    
    * gnu/packages/image-viewers.scm (nsxiv): New variable.
    
    Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/packages/image-viewers.scm | 57 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 477f681..b059f31 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -417,6 +417,63 @@ base should be kept small and clean to make it easy for 
you to dig into
 it and customize it for your needs.")
     (license license:gpl2+)))
 
+(define-public nsxiv
+  (package
+    (name "nsxiv")
+    (version "27.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/nsxiv/nsxiv";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1na7f0hpc9g04nm7991gzaqr5gkj08n2azx833hgxcm2w1pnn1bk"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ;no check target
+       #:make-flags
+       (list (string-append "PREFIX=" %output)
+             (string-append "CC=" ,(cc-for-target)))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Xft.h #includes <ft2build.h> without ‘freetype2/’.  The
+             ;; Makefile works around this by hard-coding /usr/include &
+             ;; $PREFIX.
+             (let ((freetype (string-append (assoc-ref inputs "freetype")
+                                            "/include/freetype2")))
+               (substitute* "Makefile"
+                 (("-I/usr/include/freetype2 
-I\\$\\(PREFIX\\)/include/freetype2")
+                  (string-append "-I" freetype))))))
+         (add-after 'install 'install-desktop-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "nsxiv.desktop"
+                           (string-append (assoc-ref outputs "out")
+                                          "/share/applications"))))
+         (add-after 'install 'install-icons
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "-C" "icon" "install" make-flags))))))
+    (inputs
+     `(("freetype" ,freetype)
+       ("giflib" ,giflib)
+       ("imlib2" ,imlib2)
+       ("libexif" ,libexif)
+       ("libx11" ,libx11)
+       ("libxft" ,libxft)))
+    (home-page "https://github.com/nsxiv/nsxiv";)
+    (synopsis "Neo Simple X Image Viewer")
+    (description
+     "nsxiv is a fork of sxiv.  Its primary goal is to provide the most basic
+features required for fast image viewing.  It has vi key bindings and works
+nicely with tiling window managers.  Its code base should be kept small and
+clean to make it easy for you to dig into it and customize it for your
+needs.")
+    (license license:gpl2+)))
+
 (define-public viewnior
   (package
     (name "viewnior")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]