summaryrefslogtreecommitdiff
path: root/gnu/packages/package-management.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/package-management.scm')
-rw-r--r--gnu/packages/package-management.scm67
1 files changed, 64 insertions, 3 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index b33e08baf2..65cd7087b4 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -36,6 +36,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)
@@ -69,6 +70,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)
@@ -104,6 +106,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)
@@ -588,6 +591,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.
@@ -1112,7 +1173,7 @@ written entirely in Python.")
("automake" ,automake)
("cmake" ,cmake) ;requires cmake >= 3.17
("git" ,git-minimal)
- ("meson" ,meson-0.55)
+ ("meson" ,meson)
("ninja",ninja)
("pkg-config" ,pkg-config)
("python-bottle" ,python-bottle)
@@ -1553,8 +1614,8 @@ the boot loader configuration.")
(add-after 'unpack 'fix-tests
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively
- (string-append (assoc-ref inputs "glibc-utf8-locales")
- "/lib/locale/") "/tmp/locale")
+ (search-input-directory inputs "lib/locale")
+ "/tmp/locale")
(for-each make-file-writable (find-files "/tmp"))
(substitute* "tests/make-test-runtime.sh"
(("cp `which.*") "echo guix\n")