summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2025-01-10 22:38:48 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2025-01-10 22:38:48 +0100
commit3b615d061f5d0470096f362d86814a8046e7865b (patch)
tree1c28b61459f308b9d9b01da7b614e673e2133ace
parent990fd8c2acb420061013ad4d8c60be848116a30b (diff)
elenq: add logos
-rw-r--r--elenq/graphics.scm57
1 files changed, 56 insertions, 1 deletions
diff --git a/elenq/graphics.scm b/elenq/graphics.scm
index 0a44a78..172aa93 100644
--- a/elenq/graphics.scm
+++ b/elenq/graphics.scm
@@ -1,9 +1,12 @@
(define-module (elenq graphics)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system font)
+ #:use-module (guix build-system copy)
#:use-module (guix gexp)
#:use-module (guix git-download)
- #:use-module (guix packages))
+ #:use-module (guix packages)
+ #:use-module (gnu packages guile)
+ #:use-module (gnu packages gnome))
(define-public font-armata
(package
@@ -52,3 +55,55 @@ improvements:
@item Cleaned source blob files that required proprietary software.
@end itemize")
(license license:silofl1.1))))
+
+(define-public elenq-logos
+ (let ((revision "1")
+ (commit "3612f4a88e6a06a9c0fa7cfdb81cbbf6f081a1a9"))
+ (package
+ (name "elenq-logos")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/elenq-logos/")
+ (commit commit)))
+ (sha256
+ (base32 "0q0a5p84vxwcj3516snnwq09i3g36idfmvpp46vsl9hcq9z53ha3"))))
+ (native-inputs (list librsvg font-armata guile-3.0-latest))
+ (arguments
+ (list
+ #:install-plan ''(("out/" "share/elenq"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'build
+ (lambda _
+ (define out "out")
+
+ (define (redirected-to-file filename . command)
+ (with-output-to-file filename
+ (lambda () (apply invoke command))))
+
+ (define (make-all-logo-formats subname)
+ (let ((base (string-append out "/elenq-" subname ".svg")))
+ (redirected-to-file base "guile" "logo/elenq.scm" subname)
+ (invoke
+ "rsvg-convert" base "--format=svg" "--output"
+ (string-append out "/elenq-" subname ".optimized.svg"))
+ (for-each
+ (lambda (size)
+ (invoke
+ "rsvg-convert" base "--format=png" "--output"
+ (string-append out "/elenq-" subname "-" size ".png")
+ "-w" size "--keep-aspect-ratio"))
+ (map (lambda (x) (number->string (integer-expt 2 x)))
+ (iota 6 5 1)))))
+
+ (mkdir "out")
+ (for-each make-all-logo-formats
+ (list "technology" "publishing")))))))
+ (build-system copy-build-system)
+ (home-page "https://elenq.tech")
+ (synopsis "ElenQ logos")
+ (description "ElenQ Technology logos in different sizes and formats.")
+ (license license:cc-by-sa4.0))))