[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
77/80: gnu: Add guix-icons.
From: |
guix-commits |
Subject: |
77/80: gnu: Add guix-icons. |
Date: |
Sat, 2 Oct 2021 06:56:18 -0400 (EDT) |
mothacehe pushed a commit to branch core-updates-frozen
in repository guix.
commit 43c15ee672e1755727a9d6a36ef5ba873c4e0ef0
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Sep 28 10:16:47 2021 +0000
gnu: Add guix-icons.
* gnu/packages/package-management.scm (guix-icons): New variable.
---
gnu/packages/package-management.scm | 61 +++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/package-management.scm
b/gnu/packages/package-management.scm
index 4f80479..b527d93 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -35,6 +35,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages package-management)
+ #:use-module (gnu artwork)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages attr)
@@ -66,6 +67,7 @@
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages less)
#:use-module (gnu packages libedit)
#:use-module (gnu packages linux)
@@ -99,6 +101,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
+ #:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -583,6 +586,64 @@ out) and returning a package that uses that as its
'source'."
#:recursive? #t
#:select? (force select?))))))))
+(define-public guix-icons
+ (package
+ (inherit guix)
+ (name "guix-icons")
+ (version "0.1")
+ (source %artwork-repository)
+ (build-system trivial-build-system)
+ (native-inputs
+ `(("imagemagick" ,imagemagick)))
+ (inputs
+ '())
+ (arguments
+ `(#:modules ((guix build utils)
+ (gnu build svg))
+ #:builder
+ ,(with-extensions (list guile-rsvg guile-cairo)
+ #~(begin
+ (use-modules (guix build utils)
+ (gnu build svg))
+ (let* ((logo (string-append #$source "/logo/Guix.svg"))
+ (logo-white
+ (string-append #$source
+ "/logo/Guix-horizontal-white.svg"))
+ (theme "hicolor")
+ (category "apps")
+ (sizes '(16 24 32 48 64 72 96 128 256 512 1024))
+ (icons
+ (string-append #$output "/share/icons/" theme))
+ (scalable-dir
+ (string-append icons "/scalable/" category)))
+ (setenv "XDG_CACHE_HOME" (getcwd))
+
+ ;; Create the scalable icon files.
+ (mkdir-p scalable-dir)
+ (copy-file logo
+ (string-append scalable-dir "/guix-icon.svg"))
+ (copy-file logo-white
+ (string-append scalable-dir
+ "/guix-white-icon.svg"))
+
+ ;; Create the fixed dimensions icon files.
+ (for-each
+ (lambda (size)
+ (let* ((dimension
+ (format #f "~ax~a" size size))
+ (file
+ (string-append icons "/" dimension "/" category
+ "/guix-icon.png")))
+ (mkdir-p (dirname file))
+ (svg->png logo file
+ #:width size
+ #:height size)))
+ sizes))))))
+ (synopsis "GNU Guix icons")
+ (description "This package contains GNU Guix icons organized according to
+the Icon Theme Specification. They can be used by applications querying the
+GTK icon cache for instance.")))
+
;;;
;;; Other tools.
- 63/80: gnu: gnome-online-miners: Fix build., (continued)
- 63/80: gnu: gnome-online-miners: Fix build., guix-commits, 2021/10/02
- 64/80: gnu: gnome-photos: Update to 40.0., guix-commits, 2021/10/02
- 65/80: gnu: gnome: Add gnome-music and gnome-photo., guix-commits, 2021/10/02
- 68/80: gnu: gnome-mines: Update to 40.0., guix-commits, 2021/10/02
- 76/80: gnu: gnome-weather: Fix GNOME integration., guix-commits, 2021/10/02
- 79/80: system: Introduce the os-release file., guix-commits, 2021/10/02
- 78/80: system: Add guix-icons to the base packages., guix-commits, 2021/10/02
- 73/80: gnu: gegl: Add libraw support., guix-commits, 2021/10/02
- 80/80: gnu: gdm: Add the Guix icon., guix-commits, 2021/10/02
- 74/80: gnu: gnome: Add tracker-miners., guix-commits, 2021/10/02
- 77/80: gnu: Add guix-icons.,
guix-commits <=
- 67/80: gnu: gnome-shell: Update to 40.5., guix-commits, 2021/10/02
- 69/80: gnu: gnome-sudoku: Update to 40.2., guix-commits, 2021/10/02
- 75/80: gnu: gnome-music: Add gst-plugins-good., guix-commits, 2021/10/02