Add avatar-generator

Evgeny PisemskySat Aug 16 14:30:01+0300 2025

20a4f78

Add avatar-generator

README unknown status 2

1-
# SPDX-FileCopyrightText: 2025 Evgeny Pisemsky <mail@pisemsky.site>
2-
# SPDX-License-Identifier: GPL-3.0-or-later
3-
4-
#+title: cogd
5-
#+subtitle: Channel of guix definitions
6-
7-
* Setup
8-
9-
This is a guix channel. To setup and use it, add the following record:
10-
11-
#+begin_example
12-
(channel
13-
 (name 'cogd)
14-
 (url "https://repo.pisemsky.site/git/cogd")
15-
 (introduction
16-
  (make-channel-introduction
17-
   "fcdf9f9ce0d8d0ebd035fa55ec7c1ddd6890e728"
18-
   (openpgp-fingerprint
19-
    "15FF37F790C1BADB35B3752BE3D3B72AB5733021"))))
20-
#+end_example
21-
22-
to your guix channel configuration file, save it, and run =guix pull=.
23-
24-
# Local Variables:
25-
# mode: org
26-
# End:

README.md unknown status 1

1+
<!--
2+
SPDX-FileCopyrightText: 2025 Evgeny Pisemsky <mail@pisemsky.site>
3+
4+
SPDX-License-Identifier: GPL-3.0-or-later
5+
-->
6+
7+
# Channel of guix definitions
8+
9+
## Setup
10+
11+
This is a guix channel. To setup and use it, add the following record:
12+
13+
``` example
14+
(channel
15+
 (name 'cogd)
16+
 (url "https://repo.pisemsky.site/git/cogd")
17+
 (introduction
18+
  (make-channel-introduction
19+
   "fcdf9f9ce0d8d0ebd035fa55ec7c1ddd6890e728"
20+
   (openpgp-fingerprint
21+
    "15FF37F790C1BADB35B3752BE3D3B72AB5733021"))))
22+
```
23+
24+
to your guix channel configuration file, save it, and run `guix pull`.

channels.scm

1717
        (make-channel-introduction
1818
         "fcdf9f9ce0d8d0ebd035fa55ec7c1ddd6890e728"
1919
         (openpgp-fingerprint
20-
          "15FF37F790C1BADB35B3752BE3D3B72AB5733021"))))
21-
      (channel
22-
       (name 'homeassistant)
23-
       (url "https://repo.pisemsky.site/git/guix-homeassistant")
24-
       (introduction
25-
        (make-channel-introduction
26-
         "afdbb5ae25c050882424682eb5474baf00589e27"
27-
         (openpgp-fingerprint
2820
          "15FF37F790C1BADB35B3752BE3D3B72AB5733021")))))

modules/cogd/packages/web.scm

99
             (guix gexp)
1010
             (guix build-system copy)
1111
             ((guix licenses) #:prefix license:)
12+
             ((gnu packages web) #:select (cat-avatar-generator))
1213
             (cogd packages javascript))
1314
1415
(define-public simpledotcss

9798
      (synopsis "hashvatar")
9899
      (description "hashvatar")
99100
      (license license:asl2.0))))
101+
102+
(define-public avatar-generator
103+
  (let ((commit "f0cfd9e061ccbd9009a34601a8c78150e8d214c5")
104+
        (revision "0"))
105+
    (package
106+
      (inherit cat-avatar-generator)
107+
      (name "avatar-generator")
108+
      (version (git-version "0" revision commit))
109+
      (source
110+
       (origin
111+
         (method git-fetch)
112+
         (uri (git-reference
113+
               (url "https://framagit.org/Deevad/cat-avatar-generator.git")
114+
               (commit commit)))
115+
         (file-name (git-file-name name version))
116+
         (sha256
117+
          (base32 "13jkpimxqgik49vjj0hbspgf7qzbz1g1m3s21jc7rfzy6rrkqwfz"))))
118+
      (build-system copy-build-system)
119+
      (arguments
120+
       (list
121+
        #:phases
122+
        #~(modify-phases %standard-phases
123+
            (add-after 'unpack 'set-cache-path
124+
              (lambda _
125+
                (substitute* "public/avatar.php"
126+
                  (("const CACHE_PATH = .*")
127+
                   "const CACHE_PATH = '/var/cache/avatar-generator/';")))))
128+
        #:install-plan
129+
        #~(map (lambda (dir)
130+
                 (list dir "share/web/avatar-generator/"))
131+
               '("avatars" "public" "src")))))))