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
17 | 17 | (make-channel-introduction | |
18 | 18 | "fcdf9f9ce0d8d0ebd035fa55ec7c1ddd6890e728" | |
19 | 19 | (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 | |
28 | 20 | "15FF37F790C1BADB35B3752BE3D3B72AB5733021"))))) |
modules/cogd/packages/web.scm
9 | 9 | (guix gexp) | |
10 | 10 | (guix build-system copy) | |
11 | 11 | ((guix licenses) #:prefix license:) | |
12 | + | ((gnu packages web) #:select (cat-avatar-generator)) | |
12 | 13 | (cogd packages javascript)) | |
13 | 14 | ||
14 | 15 | (define-public simpledotcss | |
… | |||
97 | 98 | (synopsis "hashvatar") | |
98 | 99 | (description "hashvatar") | |
99 | 100 | (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"))))))) |