summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..3a353ef
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,58 @@
+(use-modules
+ ((guix licenses) #:prefix license:)
+ (guix build-system copy)
+ (guix gexp)
+ (guix git-download)
+ (guix packages)
+ (guix build utils)
+ (gnu packages gnome)
+ (gnu packages guile)
+ (elenq graphics))
+
+(define %source-dir (dirname (current-filename)))
+
+(define-public elenq-logos
+ (package
+ (name "elenq-logos")
+ (version "0.0.1")
+ (source (local-file %source-dir #:recursive? #t))
+ (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:asl2.0)))
+
+elenq-logos