aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/web.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-02-16 13:14:26 -0500
committerMark H Weaver <mhw@netris.org>2018-02-16 13:14:26 -0500
commit150062f19060687dbf8e2cbe6a22c2f8600e7c4e (patch)
tree4c25afac34832d118407180d66121f1a2f0c761d /gnu/packages/web.scm
parent54a93355c22ab533743cd948cf7b57993c789686 (diff)
parent6a3cf4e6c7d77634d67902215f0017c12455c6fb (diff)
downloadguix-150062f19060687dbf8e2cbe6a22c2f8600e7c4e.tar
guix-150062f19060687dbf8e2cbe6a22c2f8600e7c4e.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/web.scm')
-rw-r--r--gnu/packages/web.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index a0b59f3969..9156655b30 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6296,3 +6297,46 @@ features include:
@item logging with multiple log levels.
@end enumerate\n")
(license l:expat)))
+
+(define-public cat-avatar-generator
+ (package
+ (name "cat-avatar-generator")
+ (version "1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://framagit.org/Deevad/cat-avatar-generator.git")
+ (commit "71c0c662742cafe8afd2d2d50ec84243113e35ad")))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "0s7b5whqsmfa57prbgl66ym551kg6ly0z14h5dgrlx4lqm70y2yw"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (php-dir (string-append %output "/share/web/" ,name "/")))
+ ;; The cache directory must not be in the store, but in a writable
+ ;; location. The webserver will give us this location.
+ (copy-recursively source php-dir)
+ (substitute* (string-append php-dir "/cat-avatar-generator.php")
+ (("\\$cachepath = .*")
+ "if(isset($_SERVER['CACHE_DIR']))
+$cachepath = $_SERVER['CACHE_DIR'];
+else
+die('You need to set the CACHE_DIR variable first.');"))))))
+ (home-page "https://framagit.org/Deevad/cat-avatar-generator")
+ (synopsis "Random avatar generator")
+ (description "Cat avatar generator is a generator of cat pictures optimised
+to generate random avatars, or defined avatar from a \"seed\". This is a
+derivation by David Revoy from the original MonsterID by Andreas Gohr.")
+ ;; expat for the code, CC-BY 4.0 for the artwork
+ (license (list l:expat
+ l:cc-by4.0))))