Put in earplugs

This commit is contained in:
nik gaffney 2024-01-17 19:17:54 +01:00
parent aa9c83f62f
commit 1244cdf246
Signed by: nik
GPG key ID: 989F5E6EDB478160
14 changed files with 2326 additions and 2 deletions

View file

@ -4,7 +4,6 @@
(version 0)
(name 'zzkt)
(news-file "news.scm")
(directory "packages")
(directory "channel")
(url "https://gitlab.com/zzkt/guix")
(branch "endless"))

View file

@ -0,0 +1,271 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; as seen near gnu/packages/fonts.scm
(define-module (zzkt packages fonts-osp)
#:use-module (ice-9 regex)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system font))
;; http://osp.kitchen/foundry
;; - [ ] ax-28-script
;; - [ ] belogodor
;; - [ ] certegeska
;; - [ ] cimatics
;; - [ ] cowboy-henk
;; - [ ] dlf
;; - [ ] erbarre
;; - [ ] le-patin-helvete
;; - [ ] limousine
;; - [ ] logisoso
;; - [ ] metadin
;; - [ ] mill
;; - [ ] notcouriersans
;; - [ ] philibert
;; - [ ] polsku
;; - [ ] sans-guilt-wafer
;; - [ ] skeleton
;; - [ ] ume
;; - [ ] vj12
;; - [ ] w-droge
;; - [x] alfphabet
;; - [x] belgica-belgika
;; - [x] crickx
;; - [x] fluxisch-else
;; - [x] libertinage
;; - [x] osp-din
;; - [x] reglo
;; - [x] sans-guilt
;; - [x] work-avec
;; http://osp.kitchen/foundry/libertinage/
;; https://gitlab.constantvzw.org/osp/foundry.libertinage
(define-public font-osp-libertinage
(package
(name "font-osp-libertinage")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.libertinage")
(commit "")))
(sha256
(base32
"10bv9kksmbsi1zf0gylywgxch6sp8c2pkyn1y6c3vs1ivhfjn9m5"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/libertinage/")
(synopsis "A font made by copying and pasting parts of Linux Libertine glyphs.")
(description "The Libertinage font-set we developed for the FLOSS+Art book. It was built by copying and pasting parts of Linux Libertine glyphs or simply by all-turning glyphs. There are 27 variations, one for each letter of the Latin alphabet and the Full version, containing all modifications.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/fluxisch-else/
;; https://gitlab.constantvzw.org/osp/foundry.fluxisch-else
(define-public font-osp-fluxisch-else
(package
(name "font-osp-fluxisch-else")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.fluxisch-else")
(commit "")))
(sha256
(base32
"0nn41gnwgnydkarjv212fdspnv29qyhrd6y2pkpwy53ds1l04p8s"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/fluxisch-else/")
(synopsis "Fluxisch Else is a font obtained from cheap phototypesetting machines.")
(description "Fluxisch Else is an experiment, a first attempt to escape the post 80 era of geometrical purity that is so typical of Postscript vector based font drawing. The shapes of Fluxisch Else were obtained from scanning printed textpages that were optically composed by cheap phototypesetting machines in the sixties and seventies. Some of Fluxisch Else beautiful features are: round angles, floating baselines, erratic kerning.
More precisely in this case, George Maciunas of the Fluxus group used an IBM composer (probably a Selectric typewriter) for most of his own work, and as a former designer, for all Fluxus work. In the 1988 book Fluxus Codex, kindly given to Pierre Huyghebaert by Sylvie Eyberg, the body text is typeset in a charmingly rounded and dancing Fluxisch that seems to smile playfully at its dry swiss creator. As if it was really tempted, trying to provide a beautiful warm up to this old modernist classical.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/sans-guilt/
;; https://gitlab.constantvzw.org/osp/foundry.sans-guilt
(define-public font-osp-sans-guilt
(package
(name "font-osp-sans-guilt")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.sans-guilt")
(commit "")))
(sha256
(base32
"0nn41gnwgnydkarjv212fdspnv29qyhrd6y2pkpwy53ds1l04p8s"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/sans-guilt/")
(synopsis "Three versions of Gill Sans based on three different sources.")
(description "Sans Guilt MB: Based on a rasterized pdf made with the Monotype Gill Sans delivered with Mac OSX.
Sans Guilt DB: Based on early sketches by Eric Gill
Sans Guilt LB: Based on lead type from Royal College of Arts letterpress workshop.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/work-avec/
;; https://gitlab.constantvzw.org/osp/foundry.work-avec
(define-public font-osp-work-avec
(package
(name "font-osp-work-avec")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.work-avec")
(commit "")))
(sha256
(base32
"06ifsydmk90fzlkvzb3ij7lzsvdiamd05s1i33fa1mk6x84a9wpz"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/work-avec/")
(synopsis "A schoolbook version of the Work Sans font.")
(description "A schoolbook version of the Work Sans font.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/crickx
;; https://gitlab.constantvzw.org/osp/foundry.crickx
(define-public font-osp-crickx
(package
(name "font-osp-crickx")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.crickx")
(commit "")))
(sha256
(base32
"06ifsydmk90fzlkvzb3ij7lzsvdiamd05s1i33fa1mk6x84a9wpz"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/crickx/")
(synopsis "A digital reinterpretation of a set of adhesive letters.")
(description "The Publi Fluor shop was situated in the northern part of Brussels, Schaerbeek, and founded by the father of Madame Christelle Crickx who was a trained letter painter. Starting to cut letters with the rounded and skilled cardboard templates drawn by her father, Madame Crickx slowly morphs the shapes by analysing how typographic niceties confuse her non-trained clients and leads to bad letters placement. She progressively removes the optical compensation of rounded tops and bottoms, straightens sides, and attaches accents for less floating parts. Those moves add a very specific orientation to this otherwise quite common bold italic sans serif display typeface.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/osp-din/
;; https://gitlab.constantvzw.org/osp/foundry.osp-din
(define-public font-osp-din
(package
(name "font-osp-din")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.osp-din")
(commit "")))
(sha256
(base32
"08lmli9l0nbcb8mhbrd458zkzm3ni29cljzkihyq438bq5v6lzxh"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/osp-din/")
(synopsis "A DIN font based on the original 1932 drawings.")
(description "The first cut of OSP-DIN was drawn for the festival Cinema du réel 2009, when we were invited to work on a cartographic version of the programme. We drew the first cut of the open source DIN from grid based drawings similar to the original 1932 drawings of the DIN we saw during our investigative trip to Berlin in February 2008.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/reglo/
(define-public font-osp-reglo
(package
(name "font-osp-reglo")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.reglo")
(commit "")))
(sha256
(base32
"0kk6k038pfmddz53js3r1dlhib5cv9mar27vcd772r1dadagb71j"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/reglo")
(synopsis "Reglo is a font so tough that you can seriously mistreat it.")
(description "Reglo is a font so tough that you can seriously mistreat it. The font was designed by Sebastien Sanfilippo in autumn 2009 and is used for Radio Panik identity.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/alfphabet/
(define-public font-osp-alfphabet
(package
(name "font-osp-alfphabet")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.alfphabet")
(commit "")))
(sha256
(base32
"0xb08k470hca23lvs700316qmjn83gsp5znhmhbjfwk0vvbjq5x9"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/alfphabet")
(synopsis "The Alfphabet family is based on the Belgian road signage lettering.")
(description "The Alfphabet family is based on the Belgian road signage lettering called Alphabet in French and Alfabet in Dutch.")
(license license:silofl1.1)))
;; http://osp.kitchen/foundry/belgica-belgika/
(define-public font-osp-belgica-belgika
(package
(name "font-osp-belgica-belgika")
(version "1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.constantvzw.org/osp/foundry.belgica-belgika")
(commit "")))
(sha256
(base32
"1mrkrrcqf16jz1y1q4avkpp6zhsmwc07aj46ssag5dyn97kcsary"))))
(build-system font-build-system)
(home-page "http://osp.kitchen/foundry/belgica-belgika")
(synopsis "Stroke fonts with no contrast and capital letters only based on diverse pseudo-generic elements for multi-usages.")
(description "Stroke fonts with no contrast and capital letters only based on diverse pseudo-generic elements for multi-usages.")
(license license:silofl1.1)))

View file

@ -0,0 +1,160 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; as seen near gnu/packages/fonts.scm
(define-module (zzkt packages fonts-velvetyne)
#:use-module (ice-9 regex)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system font))
;; https://velvetyne.fr/
;; - [ ] Amdal
;; - [ ] Anthony
;; - [ ] Avara
;; - [ ] BackOut
;; - [ ] Basteleur
;; - [x] BianZhiDai
;; - [ ] CirrusCumulus
;; - [ ] Compagnon
;; - [x] Degheest
;; - [ ] Façade
;; - [ ] Format 1452
;; - [x] Fungal
;; - [ ] Grotesk
;; - [ ] Gulax
;; - [ ] Jgs font
;; - [ ] Kaeru Kaeru
;; - [ ] Karrik
;; - [ ] Le Murmure
;; - [ ] Lineal
;; - [ ] Lithops
;; - [ ] Mess
;; - [ ] Mourier
;; - [ ] Ouroboros
;; - [ ] Outward
;; - [ ] PicNic
;; - [ ] Pilowlava
;; - [ ] Sligoil
;; - [ ] TINY
;; - [ ] Typefesse
;; - [ ] VG5000
;; bianzhidai - https://velvetyne.fr/fonts/bianzhidai/
(define-public font-velvetyne-bianzhidai
(package
(name "font-velvetyne-bianzhidai")
(version "2.0")
(source (origin
(method url-fetch)
(uri "https://github.com/sdfggvfvj/bianzhidai-2.0/archive/refs/tags/OFL.tar.gz")
(sha256
(base32
"0p6bbvy3m474h57wm3nlg6zz94f3y2d6mhiawmlgg8zbny26kjl2"))))
(build-system font-build-system)
(home-page "https://velvetyne.fr/fonts/bianzhidai/")
(synopsis "BianZhiDai is a font inspired by shading characters in ASCII art and woven plastic bags.")
(description "BianZhiDai is a font inspired by shading characters in ASCII art and 编织袋 (woven plastic bag in Simple Chinese). BianZhiDai is good with colors, especially in combination with different fill/stroke colors. Try it, and play it. Besides, the whole font is modular based, so you can customize it in Glyphs any way you like.")
(license license:silofl1.1)))
;; font-velvetyne-cirruscumulus
;; degheest family - https://velvetyne.fr/fonts/degheest/
(define-public font-velvetyne-degheest
(package
(name "font-velvetyne-degheest")
(version "")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/Eugenie-B/degheest-types/")
(commit "")))
(sha256
(base32
"0js6h8ch9dbha2lkcmhpy5qmryzi09pjkryqzngg0kn4k2cyg1bw"))))
(build-system font-build-system)
(home-page "https://velvetyne.fr/fonts/degheest")
(synopsis "A font family of Ange Degheests remarkable typefaces and lettering work.")
(description "After discovering Ange Degheests archives at the Rennes School of Fine Arts, we decided to put together an exhibition that attempted to finally give the designer the full recognition she deserves. In this exhibition, visitors learnt about Degheests life story and professional achievements, and discovered many original archival documents that had never previously been presented to the public. In addition to this historical research, we revived some of Ange Degheests most remarkable typefaces and lettering work, which are now available in digital format.
To revive means: to resurrect, to reactivate, to renew; and in many ways our work consisted in a kind of resurrection. We had indeed to reactivate the memory of Ange Degheest by diving in her archives, by exhuming the story of a woman who lived through many ages and locations. Only once we had acquired a good grasp of her life story, were we able to revive her typefaces. Reviving her designs and distributing them widely, free of charge, is our way to honour Ange Degheests memory and to give them a new life in the 21st century.
Deheest is a project by Ange Degheest, Eugénie Bidaut, Oriane Charvieux, Mandy Elbé, Luna Delabre, Camille Depalle, Justine Herbel, May Jolivet and Benjamin Gomez, created in Atelier de création typographique from EESAB Rennes.")
(license license:silofl1.1)))
;; fungal - https://velvetyne.fr/fonts/fungal/
(define-public font-velvetyne-fungal
(package
(name "font-velvetyne-fungal")
(version "")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/velvetyne/fungal/")
(commit "")))
(sha256
(base32
"0ab552f5f3fm7l7dj7jgg0klj66giwgyl1nx21rqvqdr6vf2zmch"))))
(build-system font-build-system)
(home-page "https://velvetyne.fr/fonts/fungal")
(synopsis "Libre variable font inspired by mycelium growth, forked from DejaVu Sans.")
(description "In 2022, Hato press invited Raphaël Bastide to do a publication part of the zine series. In a wish to revive the fan part of fanzine, Raphaël Bastide decided to pay tribute to Wikipedia, a surviving, precious, unequaled place on the open WWW. The 16 pages riso print zine shows the encyclopedias interface as a post-human vestige, an artifact invaded by biomorphic figures and spreading typography. Through the pages of the zine, the reader discovers how the graphic elements are spreading like mycelium, creating an ornamental graphic network.
The Fungal font is a close collaboration between Jérémy Landes and Raphaël Bastide, so the characters of the zine can grow and spread thanks to their variable design. Fungal is a fork of DejaVu Sans, a libre font, popular on Linux systems.
The hypæ of the mycelium growing from each glyphs can be controlled in their length (the Grow axis) and in their thickness (the Thickness axis) allowing to fine tune the density of the rhizome growing on the page and the legibility of the text in the same move.")
;; Fungal is under Bitstream Vera Fonts Copyright
(license license:silofl1.1)))
;; https://velvetyne.fr/fonts/sligoil/
;; font-velvetyne-sligoil
;; https://velvetyne.fr/fonts/outward/
;; font-velvetyne-outward
;; https://velvetyne.fr/fonts/karrik/
;; font-velvetyne-karrik
;; https://velvetyne.fr/fonts/le-murmure/
;; font-velvetyne-le-murmure
;; https://velvetyne.fr/fonts/resistance/
;; font-velvetyne-resistance
;; https://velvetyne.fr/fonts/gulax/
;; font-velvetyne-gulax
;; https://velvetyne.fr/fonts/lineal/
;; font-velvetyne-lineal

View file

@ -0,0 +1,108 @@
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; as seen near gnu/packages/fonts.scm
(define-module (zzkt packages fonts)
#:use-module (ice-9 regex)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system font)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
#:use-module (gnu packages c)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gd)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sdl)
#:use-module (gnu packages xorg))
;; various foundries
;; velvetyne -> see fonts-velvetyne.scm
;; OSP -> see fonts-OSP.scm
;; not your type
;; https://notyourtype.nl/typefaces/
;; other / misc
;; https://github.com/dharmatype/Bebas-Neue
;; https://github.com/undercasetype/Fraunces
;; https://github.com/ryanoasis/nerd-fonts
;; https://github.com/githubnext/monaspace
(define-public font-monaspace
(package
(name "font-monaspace")
(version "1.000")
(source (origin
(method url-fetch)
(uri "https://github.com/githubnext/monaspace/archive/refs/tags/v1.000.tar.gz")
(sha256
(base32
"0lg5qwml3fv58xk92sgamxg3rni7am2m6xzzj8pcq758idiphs8d"))))
(build-system font-build-system)
(home-page "https://monaspace.githubnext.com")
(synopsis "An innovative superfamily of fonts for code.")
(description "The Monaspace type system is a monospaced type superfamily with some modern tricks up its sleeve. It consists of five variable axis typefaces. Each one has a distinct voice, but they are all metrics-compatible with one another, allowing you to mix and match them for a more expressive typographical palette.")
(license license:silofl1.1)))
;; https://github.com/uswds/public-sans
;; https://github.com/arrowtype/recursive
;; testing and/or example
;; (define-public font-artifika
;; (package
;; (name "font-artifika")
;; (version "1.102")
;; (source (origin
;; (method git-fetch)
;; (uri (git-reference
;; (url "https://github.com/cyrealtype/Artifika")
;; (commit (string-append "v" version))))
;; (file-name (git-file-name name version))
;; (sha256
;; (base32
;; "0nwjm44nys1qz3wyg0mm15gdjpz641xpmsz00n6m8065xrw86q7i"))))
;; (build-system font-build-system)
;; (home-page "https://github.com/cyrealtype/Artifika")
;; (synopsis "Upright italic font")
;; (description "Artifika is an upright italic font for fashionable display
;; titling.")
;; (license license:silofl1.1)))

View file

@ -0,0 +1,52 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (zzkt packages frameworkinfo)
#:use-module (guix)
#:use-module (guix build-system python)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages linux)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz))
(define-public frameworkinfo
(package
(name "frameworkinfo")
(version "0.3")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/zzkt/frameworkinfo")
(commit "endless")))
(file-name (git-file-name name version))
(sha256 (base32
"0j5qnz3zzs17qb9hxjjnwgba4sijm2ar8s1ba551f0v6jsidf29f"))))
(propagated-inputs
(list sudo dmidecode pciutils lshw))
(build-system python-build-system)
(arguments
`(#:tests? #f))
(home-page "https://github.com/zzkt/frameworkinfo")
(synopsis "Show hardware info for framework laptop.")
(description "Show information about hardware, BIOS, CPU and kernel version.")
(license license:gpl3+)))

View file

@ -0,0 +1,47 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (zzkt packages plugdata)
#:use-module (guix)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages gawk))
(define-public plugdata
(package
(name "plugdata")
(version "0.8.2")
(source
(origin
(method url-fetch)
(uri "https://github.com/plugdata-team/plugdata/archive/refs/tags/v0.8.2.tar.gz")
(sha256 (base32 "18c340hnx1sny87dby8wahijl1ssj1av67ff232gfwymfra6rdxm"))))
;; see https://github.com/juce-framework/JUCE/blob/master/docs/Linux%20Dependencies.md
(inputs
(list gawk perl))
(build-system cmake-build-system)
(arguments
`(#:tests? #f))
(home-page "https://plugdata.org/")
(synopsis "A visual programming environment for audio experimentation, prototyping and education")
(description "A visual programming environment for audio experimentation, prototyping and education")
(license license:gpl3+)))

View file

@ -0,0 +1,51 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (zzkt packages sbcl-osc)
#:use-module (guix)
#:use-module (guix build-system asdf)
#:use-module (gnu packages lisp-xyz)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:))
(define-public sbcl-osc
(let ((commit "f647738ccc22925ed740a8ca9132fda76a05baeb")
(revision "0"))
(package
(name "sbcl-osc")
(version (git-version "0.9" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/zzkt/osc")
(commit commit)))
(file-name (git-file-name "cl-osc" version))
(sha256 (base32 "1x4cavspaxcr604g0hwak1ncy4m9cqq03ji4v56g2h1443n7h48a"))))
(build-system asdf-build-system/sbcl)
(inputs (list sbcl-ieee-floats))
(synopsis "Implementation of the Open Sound Control protocol")
(description "This is a lisp implementation of the Open Sound Control protocol (or more accurately “data transport specification” or “encoding”). The code should be close to ANSI standard common lisp and provides self contained code for encoding and decoding of OSC data, messages, and bundles.")
(home-page "https://github.com/zzkt/osc/")
(license (list license:gpl3+)))))
(define-public cl-osc
(sbcl-package->cl-source-package sbcl-osc))
(define-public ecl-osc
(sbcl-package->ecl-package sbcl-osc))

View file

@ -0,0 +1,112 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2018, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018, 2021, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is (not yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; via https://issues.guix.gnu.org/68203
(define-module (zzkt packages scribus)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages cups)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gtk)
#:use-module (gnu packages hunspell)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libreoffice)
#:use-module (gnu packages linux)
#:use-module (gnu packages pdf)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages qt)
#:use-module (gnu packages tls)
#:use-module (gnu packages xml))
(define-public scribus
(package
(name "scribus")
(version "1.6.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/scribus/scribus/"
version "/scribus-" version ".tar.gz"))
(sha256
(base32 "10ixrvi1rn20r8nni6cllvkszcx77pyca68vrixjsy7nk1brx9nw"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no test target
#:configure-flags
'("-DWANT_GRAPHICSMAGICK=1"
"-DWANT_CPP17=ON")))
(inputs
(list boost
cairo
cups
fontconfig
freetype
graphicsmagick
harfbuzz
hunspell
icu4c
lcms
libcdr
libfreehand
libjpeg-turbo
libmspub
libpagemaker
librevenge
libtiff
libvisio
libxml2
libzmf
openssl
podofo
poppler
python ;need Python library
qtbase-5
qtdeclarative-5
zlib))
(native-inputs
(list pkg-config qttools-5 util-linux))
(home-page "https://www.scribus.net")
(synopsis "Desktop publishing and page layout program")
(description
"Scribus is a @dfn{desktop publishing} (DTP) application and can
be used for many tasks; from brochure design to newspapers, magazines,
newsletters and posters to technical documentation. Scribus supports
professional DTP features, such as CMYK color and a color management
system to soft proof images for high quality color printing, flexible
PDF creation options, Encapsulated PostScript import/export and
creation of four color separations, import of EPS/PS and SVG as native
vector graphics, Unicode text including right to left scripts such as
Arabic and Hebrew via FreeType.")
(license license:gpl2+)))

View file

@ -0,0 +1,603 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2024 nik gaffney <nik@fo.am>
;;;
;;; This file is (not yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;;; via unofficial channels
;;; https://repo.fo.am/zzkt/guix
(define-module (zzkt packages soupault)
#:use-module (guix)
#:use-module (guix build-system dune)
#:use-module (guix build-system ocaml)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages glib)
#:use-module (gnu packages libevent)
#:use-module (gnu packages pkg-config)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:))
;; v4.7.0
;; https://github.com/ocaml/opam-source-archives/raw/main/soupault.4.7.0.tar.gz
;; 0y4dlifiqs4x3w87lkfdiw0i89v8j69ax5mxp7g6lq0h40g8n4i6
;; v4.6.0
;; https://github.com/ocaml/opam-source-archives/raw/main/soupault.4.6.0.tar.gz
;; 1rc1jqri24ib5w109y8ffl9k835b6s9cyxj0s2px7aabwsf3iidf
(define-public soupault
(package
(name "soupault")
(version "4.6.0")
(source
(origin
(method url-fetch)
(uri
"https://github.com/ocaml/opam-source-archives/raw/main/soupault.4.6.0.tar.gz")
(sha256
(base32 "1rc1jqri24ib5w109y8ffl9k835b6s9cyxj0s2px7aabwsf3iidf"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs (list ocaml-containers
ocaml-fileutils
ocaml-logs
ocaml-fmt
ocaml-lambdasoup
ocaml-markup
ocaml-otoml
ocaml-ezjsonm
ocaml-yaml
ocaml-csv
ocaml-lwt
ocaml-re
ocaml-odate
ocaml-spelll
ocaml-base64
ocaml-jingoo
ocaml-camomile
ocaml-digestif
ocaml-tsort
ocaml-lua-ml))
(home-page "https://www.soupault.app")
(synopsis "Static website generator based on HTML rewriting")
(description
"This package provides a website generator that works with page element tree
rather than text and allows you to manipulate pages and retrieve metadata from
existing HTML using arbitrary CSS selectors. With soupault you can: * Generate
@code{ToC} and footnotes. * Insert file content or an HTML snippet in any
element. * Preprocess element content with external programs (e.g. run `<pre>`
tags through a highlighter) * Extract page metadata (think microformats) and
render it using a Jingoo template or an external script. * Export extracted
metadata to JSON. Soupault is extensible with Lua (2.5) plugins and provides an
API for element tree manipulation, similar to web browsers. The website
generator mode is optional, you can use it as post-processor for existing sites.")
(license license:expat)))
;; ocaml packages not (yet) in guix as of 2024-01-04
;; ocaml-containers
;; ocaml-lambdasoup
;; ocaml-otoml
;; ocaml-yaml
;; ocaml-odate
;; ocaml-spelll
;; ocaml-jingoo
;; ocaml-tsort
;; ocaml-lua-ml
;; ocaml-qcheck-core
;; ocaml-iter
;; via guix import opam containers
(define-public ocaml-containers
(package
(name "ocaml-containers")
(version "3.13.1")
(source
(origin
(method url-fetch)
(uri
"https://github.com/c-cube/ocaml-containers/releases/download/v3.13.1/containers-3.13.1.tbz")
(sha256
(base32 "114pcswmscbh5mvniiarbk5jqma3kjs6w9bx2p2lzw1w5kmjd6zb"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-either dune-configurator ocaml-odoc))
(native-inputs (list ocaml-qcheck-core
ocaml-yojson
ocaml-iter
ocaml-gen
ocaml-csexp
ocaml-uutf))
(home-page "https://github.com/c-cube/ocaml-containers/")
(synopsis
"A modular, clean and powerful extension of the OCaml standard library")
(description #f)
(license license:bsd-2)))
;; via guix import opam lambdasoup
(define-public ocaml-lambdasoup
(package
(name "ocaml-lambdasoup")
(version "1.0.0")
(source
(origin
(method url-fetch)
(uri "https://github.com/aantron/lambdasoup/archive/1.0.0.tar.gz")
(sha256
(base32 "1g5jr1s024z755slz5zg4cssmxqbva0d0nhn75wd09p45v7c94x3"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-camlp-streams ocaml-markup ocaml-bisect-ppx))
(native-inputs (list ocaml-ounit2))
(home-page "https://github.com/aantron/lambdasoup")
(synopsis
"Easy functional HTML scraping and manipulation with CSS selectors")
(description
"Lambda Soup is an HTML scraping library inspired by Python's Beautiful Soup. It
provides lazy traversals from HTML nodes to their parents, children, siblings,
etc., and to nodes matching CSS selectors. The traversals can be manipulated
using standard functional combinators such as fold, filter, and map. The DOM
tree is mutable. You can use Lambda Soup for automatic HTML rewriting in
scripts. Lambda Soup rewrites its own ocamldoc page this way. A major goal of
Lambda Soup is to be easy to use, including in interactive sessions, and to have
a minimal learning curve. It is a very simple library.")
(license license:expat)))
;; via guix import opam otoml
(define-public ocaml-otoml
(package
(name "ocaml-otoml")
(version "1.0.4")
(source
(origin
(method url-fetch)
(uri "https://github.com/dmbaturin/otoml/archive/refs/tags/1.0.4.tar.gz")
(sha256
(base32 "1q4nq5sj31hhv0vwv3wd739scqd4ni80583dmny0ip1id4w7xkc8"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-menhir ocaml-menhirLib ocaml-uutf ocaml-odoc))
(native-inputs (list ocaml-ounit2))
(home-page "https://github.com/dmbaturin/otoml")
(synopsis
"TOML parsing, manipulation, and pretty-printing library (1.0.0-compliant)")
(description
"OTOML is a library for parsing, manipulating, and pretty-printing TOML files. *
Fully 1.0.0-compliant. * No extra dependencies: default implementation uses
native numbers and represents dates as strings. * Provides a functor for
building alternative implementations: plug your own bignum and calendar
libraries if required. * Informative parse error reporting. * Pretty-printer
offers flexible indentation options.")
(license license:expat)))
;; via guix import opam yaml
(define-public ocaml-yaml
(package
(name "ocaml-yaml")
(version "3.2.0")
(source
(origin
(method url-fetch)
(uri
"https://github.com/avsm/ocaml-yaml/releases/download/v3.2.0/yaml-3.2.0.tbz")
(sha256
(base32 "09w2l2inc0ymzd9l8gpx9pd4xlp5a4rn1qbi5dwndydr5352l3f5"))))
(build-system dune-build-system)
(propagated-inputs (list dune-configurator ocaml-ctypes ocaml-bos))
(native-inputs (list ocaml-fmt
ocaml-logs
ocaml-mdx
ocaml-alcotest
ocaml-crowbar
ocaml-junit-alcotest
ocaml-ppx-sexp-value
ocaml-sexplib
ocaml-ezjsonm))
(home-page "https://github.com/avsm/ocaml-yaml")
(synopsis "Parse and generate YAML 1.1/1.2 files")
(description
"This is an OCaml library to parse and generate the YAML file format. It is
intended to interoperable with the [Ezjsonm](https://github.com/mirage/ezjsonm)
JSON handling library, if the simple common subset of Yaml is used. Anchors and
other advanced Yaml features are not implemented in the JSON compatibility
layer.")
(license license:isc)))
;; via guix import opam odate
(define-public ocaml-odate
(package
(name "ocaml-odate")
(version "0.7")
(source
(origin
(method url-fetch)
(uri "https://github.com/hhugo/odate/releases/download/0.7/odate-0.7.tbz")
(sha256
(base32 "1bsmix8qbsk04a1l2x4lrh919xq6a3pmanvgkdlc5wwp3p42q6bl"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs (list ocaml-menhir))
(native-inputs (list ocaml-lwt ocaml-ppx-expect))
(home-page "https://github.com/hhugo/odate")
(synopsis "Date & Duration Library")
(description
"Simple date and duration manipulation. Also implement duration printer based on
string format.")
(license license:expat)))
;; via guix import opam spelll
(define-public ocaml-spelll
(package
(name "ocaml-spelll")
(version "0.4")
(source
(origin
(method url-fetch)
(uri "https://github.com/c-cube/spelll/archive/v0.4.tar.gz")
(sha256
(base32 "06sv8fm8ml6s1w005c0d0lsc58qhqhij5chks3fv541b2y2mcl5q"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-seq ocaml-stdlib-shims ocaml-odoc))
(native-inputs (list ocaml-qcheck ocaml-mdx))
(home-page "https://github.com/c-cube/spelll/")
(synopsis "Fuzzy string searching, using Levenshtein automaton")
(description #f)
(license license:bsd-2)))
;; via guix import opam jingoo
(define-public ocaml-jingoo
(package
(name "ocaml-jingoo")
(version "1.5.0")
(source
(origin
(method url-fetch)
(uri "https://github.com/tategakibunko/jingoo/archive/1.5.0.tar.gz")
(sha256
(base32 "1sjq26dxh8vk184fn2md5r4ilnh7jj7baylg3f3j142l94ig6kwc"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-menhir ocaml-ppx-deriving ocaml-re ocaml-uutf
ocaml-uucp))
(native-inputs (list ocaml-ounit))
(home-page "https://github.com/tategakibunko/jingoo")
(synopsis
"Template engine almost compatible with Jinja2(python template engine)")
(description #f)
(license license:bsd-3)))
;; via guix import opam tsort
(define-public ocaml-tsort
(package
(name "ocaml-tsort")
(version "2.1.0")
(source
(origin
(method url-fetch)
(uri
"https://github.com/dmbaturin/ocaml-tsort/archive/refs/tags/2.1.0.tar.gz")
(sha256
(base32 "16vy2x384ac3wr4vdfvc2dqnln6w5bgj4frwyi0h3rgnz9cz2w1q"))))
(build-system dune-build-system)
(home-page "https://github.com/dmbaturin/ocaml-tsort")
(synopsis "Easy to use and user-friendly topological sort")
(description
"Easy to use and user-friendly topological sort. Example: ``` Tsort.sort
[(\"foundation\", []); (\"walls\", [\"foundation\"]); (\"roof\", [\"walls\"])] ```")
(license license:expat)))
;; via guix import opam lua-ml
(define-public ocaml-lua-ml
(package
(name "ocaml-lua-ml")
(version "0.9.4")
(source
(origin
(method url-fetch)
(uri "https://github.com/lindig/lua-ml/archive/refs/tags/0.9.4.tar.gz")
(sha256
(base32 "0za62jivmxrdwnnxdaad53sbryfsaj4zfqlfpdp98n9bpvsi4mad"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-odoc))
(home-page "https://github.com/lindig/lua-ml")
(synopsis "An embeddable Lua 2.5 interpreter implemented in OCaml")
(description #f)
(license license:bsd-2)))
;; via guix import opam qcheck-core
(define-public ocaml-qcheck-core
(package
(name "ocaml-qcheck-core")
(version "0.21.3")
(source
(origin
(method url-fetch)
(uri "https://github.com/c-cube/qcheck/archive/v0.21.3.tar.gz")
(sha256
(base32 "1ar416qlrb2qrnlm7vw7lzg860nrg9vw8p3rnx16xy8ryj6z5pix"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-ppxlib
ocaml-ounit2
ocaml-odoc))
(native-inputs (list ocaml-alcotest))
(home-page "https://github.com/c-cube/qcheck/")
(synopsis "Core qcheck library")
(description #f)
(license license:bsd-2)))
;; via guix import opam iter
(define-public ocaml-iter
(package
(name "ocaml-iter")
(version "1.8")
(source
(origin
(method url-fetch)
(uri "https://github.com/c-cube/iter/releases/download/v1.8/iter-1.8.tbz")
(sha256
(base32 "08rhykcizbs21mri4zx1b6vg42a4wybl238cla5bmi79bah9qwzq"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-odoc))
(native-inputs (list ocaml-qcheck-core ocaml-ounit2 ocaml-mdx))
(home-page "https://github.com/c-cube/iter/")
(synopsis
"Simple abstraction over `iter` functions, intended to iterate efficiently on collections while performing some transformations")
(description #f)
(license license:bsd-2)))
;; via guix import opam menhirLib
(define-public ocaml-menhirLib
(package
(name "ocaml-menhirLib")
(version "20230608")
(source
(origin
(method url-fetch)
(uri
"https://gitlab.inria.fr/fpottier/menhir/-/archive/20230608/archive.tar.gz")
(sha256
(base32 "13mb862c20m1q7vjsa5lgqj3w6b0xhj8ckjyk524wrc4i0s1jzix"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(home-page "http://gitlab.inria.fr/fpottier/menhir")
(synopsis "Runtime support library for parsers generated by Menhir")
(description #f)
(license #f)))
;; via guix import opam junit
(define-public ocaml-junit
(package
(name "ocaml-junit")
(version "2.0.2")
(source
(origin
(method url-fetch)
(uri
"https://github.com/Khady/ocaml-junit/releases/download/2.0.2/junit-2.0.2.tbz")
(sha256
(base32 "00bbx5j8vsy9fqbc04xa3lsalaxicirmbczr65bllfk1afv43agx"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs (list ocaml-ptime
ocaml-tyxml
ocaml-odoc
ocaml-ounit
ocaml-alcotest))
(home-page "https://github.com/Khady/ocaml-junit")
(synopsis "JUnit XML reports generation library")
(description "JUnit XML reports generation library")
(license #f)))
;; via guix import opam junit_alcotest
(define-public ocaml-junit-alcotest
(package
(name "ocaml-junit-alcotest")
(version "2.0.2")
(source
(origin
(method url-fetch)
(uri
"https://github.com/Khady/ocaml-junit/releases/download/2.0.2/junit-2.0.2.tbz")
(sha256
(base32 "00bbx5j8vsy9fqbc04xa3lsalaxicirmbczr65bllfk1afv43agx"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs (list ocaml-odoc ocaml-alcotest ocaml-junit))
(properties `((upstream-name . "junit_alcotest")))
(home-page "https://github.com/Khady/ocaml-junit")
(synopsis "JUnit XML reports generation for alcotest tests")
(description "JUnit XML reports generation for alcotest tests")
(license #f)))
;; via guix import opam junit_ounit
(define-public ocaml-junit-ounit
(package
(name "ocaml-junit-ounit")
(version "2.0.2")
(source
(origin
(method url-fetch)
(uri
"https://github.com/Khady/ocaml-junit/releases/download/2.0.2/junit-2.0.2.tbz")
(sha256
(base32 "00bbx5j8vsy9fqbc04xa3lsalaxicirmbczr65bllfk1afv43agx"))))
(build-system dune-build-system)
(arguments
`(#:tests? #f))
(propagated-inputs (list ocaml-odoc ocaml-ounit ocaml-junit))
(properties `((upstream-name . "junit_ounit")))
(home-page "https://github.com/Khady/ocaml-junit")
(synopsis "JUnit XML reports generation for OUnit tests")
(description "JUnit XML reports generation for OUnit tests")
(license #f)))
;; via guix import opam junit_camomile
;; note: camomile 1.0.2 is currently available in guix
(define-public ocaml-camomile
(package
(name "ocaml-camomile")
(version "2.0.0")
(source
(origin
(method url-fetch)
(uri
"https://github.com/savonet/Camomile/archive/refs/tags/v2.0.0.tar.gz")
(sha256
(base32 "0gfhpwh039jgf9bdjwz3dxbjs0h90qd100nrbp5llnc1pg823d3b"))))
(build-system dune-build-system)
(propagated-inputs (list ocaml-dune-site
ocaml-camlp-streams
ocaml-odoc))
;; (native-inputs (list ocaml-stdlib-random))
(home-page "https://github.com/savonet/Camomile")
(synopsis "A Unicode library")
(description
"Camomile is a Unicode library for OCaml. Camomile provides Unicode character
type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings,
collation and locale-sensitive case mappings, and more. The library is
currently designed for Unicode Standard 3.2.")
(license #f)))
;; via guix import opam dune-site
(define-public ocaml-dune-site
(package
(name "ocaml-dune-site")
(version "3.12.2")
(source
(origin
(method url-fetch)
(uri
"https://github.com/ocaml/dune/releases/download/3.12.2/dune-3.12.2.tbz")
(sha256
(base32 "1csz543wq66dcn08piabaascvbiswb1vxw1xfg4glgp8zq0mzap8"))))
(build-system dune-build-system)
(propagated-inputs (list dune
ocaml-lwt
ocaml-base
ocaml-odoc))
(home-page "https://github.com/ocaml/dune")
(synopsis "Embed locations information inside executable and libraries")
(description #f)
(license license:expat)))
;; via guix import opam lwt
;; note: v5.6 is currently available in guix
;; see also https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ocaml.scm#n2800
(define-public ocaml-lwt
(package
(name "ocaml-lwt")
(version "5.7.0")
(source
(origin
(method url-fetch)
(uri "https://github.com/ocsigen/lwt/archive/refs/tags/5.7.0.tar.gz")
(sha256
(base32 "11dpr0aprqqjgb2n4j4czpw3l0bc8dzy1jqmp2qz3xkih31k241p"))))
(build-system dune-build-system)
(arguments
`(#:package "lwt"))
(native-inputs
(list ocaml-cppo ocaml-base pkg-config))
(inputs
(list glib))
(propagated-inputs
(list ocaml-mmap ocaml-ocplib-endian ocaml-result ocaml-seq libev))
;; (propagated-inputs (list dune-configurator ocaml-ocplib-endian))
;; (native-inputs (list ocaml-cppo))
(home-page "https://github.com/ocsigen/lwt")
(synopsis "Promises and event-driven I/O")
(description
"This package provides a promise is a value that may become determined in the
future. Lwt provides typed, composable promises. Promises that are resolved by
I/O are resolved by Lwt in parallel. Meanwhile, OCaml code, including code
creating and waiting on promises, runs in a single thread by default. This
reduces the need for locks or other synchronization primitives. Code can be run
in parallel on an opt-in basis.")
(license license:expat)))
;; via guix import opam base
;; (define-public ocaml-base
;; (package
;; (name "ocaml-base")
;; (version "0.16.3")
;; (source
;; (origin
;; (method url-fetch)
;; (uri
;; "https://github.com/janestreet/base/archive/refs/tags/v0.16.3.tar.gz")
;; (sha256
;; (base32 "0g7rrwnd3sb4pcpnvq7hc7dd7rg1gh0axxdhqwjh60dxw81ybycv"))))
;; (build-system dune-build-system)
;; (propagated-inputs (list ocaml-sexplib0 dune-configurator))
;; (home-page "https://github.com/janestreet/base")
;; (synopsis "Full standard library replacement for OCaml")
;; (description
;; "Full standard library replacement for OCaml Base is a complete and portable
;; alternative to the OCaml standard library. It provides all standard
;; functionalities one would expect from a language standard library. It uses
;; consistent conventions across all of its module. Base aims to be usable in any
;; context. As a result system dependent features such as I/O are not offered by
;; Base. They are instead provided by companion libraries such as stdio:
;; https://github.com/janestreet/stdio")
;; (license license:expat)))
;; via guix import opam sexplib0
;; (define-public ocaml-sexplib0
;; (package
;; (name "ocaml-sexplib0")
;; (version "0.16.0")
;; (source
;; (origin
;; (method url-fetch)
;; (uri
;; "https://ocaml.janestreet.com/ocaml-core/v0.16/files/sexplib0-v0.16.0.tar.gz")
;; (sha256
;; (base32 "07bhj2akd6i33h11qin4wns9qnjicf871yzji7vi4i8rd1ja5nw6"))))
;; (build-system dune-build-system)
;; (home-page "https://github.com/janestreet/sexplib0")
;; (synopsis
;; "Library containing the definition of S-expressions and some base converters")
;; (description
;; "Part of Jane Street's Core library The Core suite of libraries is an industrial
;; strength alternative to OCaml's standard library that was developed by Jane
;; Street, the largest industrial user of OCaml.")
;; (license license:expat)))

View file

@ -0,0 +1,175 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 nik gaffney <nik@fo.am>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; tidal(cycles)
;;
;; run time depends
;; - supercollider
;; - https://github.com/musikinformatik/SuperDirt
(define-module (zzkt packages tidal)
#:use-module (guix)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system haskell)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages audio)
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-xyz))
(define-public tidal
(package
(name "tidal")
(version "1.9.4")
(source
(origin
(method url-fetch)
(uri (hackage-uri "tidal" version))
(sha256
(base32 "126p05lqlq8q03gdhqq378dirs5imfkk9csaf797jz1j6lcwbnv1"))))
(build-system haskell-build-system)
(properties '((upstream-name . "tidal")))
(inputs (list ghc-colour
ghc-hosc
ghc-network
ghc-clock
ghc-primitive
ghc-random
ghc-tidal-link))
(native-inputs (list ghc-microspec))
(arguments
`(#:cabal-revision ("2"
"12v805xy9nqfyn9ryqxlslqiffb6havpixi23xkmk0annbxcf8k2")))
(home-page "http://tidalcycles.org/")
(synopsis "Pattern language for improvised music")
(description "Tidal is a domain specific language for live coding patterns.")
(license license:gpl3)))
(define-public ghc-tidal-link
(package
(name "ghc-tidal-link")
(version "1.0.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "tidal-link" version))
(sha256
(base32 "0s3x73zx4rxjawcf2744z9dr05j4pabbxddrz9814h1d61q2cbb1"))))
(build-system haskell-build-system)
(properties '((upstream-name . "tidal-link")))
(home-page "http://tidalcycles.org/")
(synopsis "Ableton Link integration for Tidal")
(description
"Ableton Link integration for Tidal, to let Tidal sync with external clocks")
(license #f)))
;; hackage dependencies not in guix as of 2023-12-01
;; - ghc-hosc
;; - ghc-data-binary-ieee754
(define-public ghc-hosc
(package
(name "ghc-hosc")
(version "0.20")
(source
(origin
(method url-fetch)
(uri (hackage-uri "hosc" version))
(sha256
(base32 "17pvv6rgl74ymq7pazxqia19smsga53kkg5h1i1dgfpikrmq7fz9"))))
(build-system haskell-build-system)
(properties '((upstream-name . "hosc")))
(inputs (list ghc-blaze-builder
ghc-data-binary-ieee754
ghc-network))
(home-page "http://rohandrape.net/t/hosc")
(synopsis "Haskell Open Sound Control")
(description "Haskell library implementing the Open Sound Control protocol")
(license #f)))
(define-public ghc-data-binary-ieee754
(package
(name "ghc-data-binary-ieee754")
(version "0.4.4")
(source
(origin
(method url-fetch)
(uri (hackage-uri "data-binary-ieee754" version))
(sha256
(base32 "02nzg1barhqhpf4x26mpzvk7jd29nali033qy01adjplv2z5m5sr"))))
(build-system haskell-build-system)
(properties '((upstream-name . "data-binary-ieee754")))
(home-page "https://john-millikin.com/software/data-binary-ieee754/")
(synopsis "Parser/Serialiser for IEEE-754 floating-point values")
(description "Convert Float and Decimal values to/from raw octets.")
(license license:expat)))
(define-public ghc-microspec
(package
(name "ghc-microspec")
(version "0.2.1.3")
(source
(origin
(method url-fetch)
(uri (hackage-uri "microspec" version))
(sha256
(base32 "0615gdbsk7i3w71adjp69zabw4mli965wffm2h846hp6pjj31xcb"))))
(build-system haskell-build-system)
(properties '((upstream-name . "microspec")))
(inputs (list ghc-quickcheck))
(home-page "http://hackage.haskell.org/package/microspec")
(synopsis "Tiny QuickCheck test library with minimal dependencies")
(description
"This package provides a tiny (1 module, <500 lines) property-based (and unit)
testing library with minimal dependencies. . Instead of reinventing the wheel
(<https://xkcd.com/927>), we use a RSpec/HSpec-like DSL and run tests with
@code{QuickCheck}. . For many use-cases, microspec is a drop-in replacement for
hspec. . > import Test.Microspec > > main :: IO () > main = microspec $ do >
describe \"replicate\" $ do > it \"doubles with 2\" $ > replicate 2 x === \"xx\" > it
\"creates a list of the right size\" $ > \\(Positive n) -> length (replicate n x')
=== n > > describe \"reverse\" $ do > it \"reverse . reverse === id\" $ \\l -> >
reverse (reverse l) === (l :: [Int]) > > describe \"tail\" $ > it \"length is -1\" $
\\(@code{NonEmpty} l) -> > length (tail l :: [Int]) === length l - 1 > > describe
\"solve the halting problem\" $ > pending")
(license license:bsd-3)))
;; superdirt via -> https://github.com/musikinformatik/SuperDirt
(define-public superdirt
(package
(name "superdirt")
(version "1.7.3")
(source
(origin
(method url-fetch)
(uri "https://github.com/musikinformatik/SuperDirt/archive/refs/tags/v1.7.3.tar.gz")
(sha256 (base32 "16pl3z7979j2az8xcjglxz7rmn9rnm8mll5gns3fj193yp3w18iv"))))
(inputs
(list supercollider))
(propagated-inputs
(list supercollider))
(build-system gnu-build-system)
(arguments (list #:configure-flags #~(list "--enable-silent-rules")))
(home-page "https://github.com/musikinformatik/SuperDirt/")
(synopsis "Tidal Audio Engine")
(description "SuperCollider implementation of the Dirt sampler, originally designed for the TidalCycles environment. SuperDirt is a general purpose framework for playing samples and synths, controllable over the Open Sound Control protocol, and locally from the SuperCollider language.")
(license license:gpl3+)))

View file

@ -0,0 +1,230 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;; via https://git.sr.ht/~fishinthecalculator/gocix/tree/main/item/modules/oci/services/grafana.scm
;; and see also https://fishinthecalculator.me/blog/monitor-your-guix-system-with-grafana.html
(define-module (zzkt services grafana)
#:use-module (gnu packages admin)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu services docker)
#:use-module (gnu system shadow)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 string-fun)
#:export (grafana-service-type
grafana-configuration
grafana-configuration?
grafana-configuration-fields
grafana-configuration-datadir
grafana-configuration-image
grafana-configuration-port
grafana-configuration-grafana.ini
grafana-configuration-network
grafana-configuration->container-configuration
%grafana-accounts
%grafana-activation
grafana-configuration
grafana-configuration?
grafana-configuration-fields
grafana-configuration-server
grafana-configuration-smtp
grafana-configuration-extra-content
grafana-server-configuration
grafana-server-configuration?
grafana-server-configuration-fields
grafana-server-configuration-root-url
grafana-server-configuration-serve-from-subpath?
grafana-smtp-configuration
grafana-smtp-configuration?
grafana-smtp-configuration-fields
grafana-smtp-configuration-enabled?
grafana-smtp-configuration-host
grafana-smtp-configuration-user
grafana-smtp-configuration-password
grafana-smtp-configuration-from-address))
;; Some of this code comes from the Guix manual.
;; Check it out! It's pretty cool.
(define grafana-tag
"10.1.5")
(define grafana-image
(string-append "bitnami/grafana:" grafana-tag))
;; Turn field names, which are Scheme symbols into strings
(define (uglify-field-name field-name)
(string-replace-substring
(string-replace-substring
(symbol->string field-name) "?" "") "-" "_"))
(define (serialize-string field-name value)
#~(string-append #$(uglify-field-name field-name) " = " #$value "\n"))
(define (serialize-integer field-name value)
(serialize-string field-name (number->string value)))
(define (serialize-boolean field-name value)
(serialize-string field-name (if value "true" "false")))
(define (gf-serialize-grafana-server-configuration field-name value)
#~(string-append
"[server]\n"
#$(serialize-configuration
value grafana-server-configuration-fields)))
(define-configuration grafana-server-configuration
(domain
(string "example.org")
"The public host where grafana will be exposed.")
(root-url
(string "%(protocol)s://%(domain)s:%(http_port)s/")
"The url where grafana will be exposed.")
(serve-from-sub-path?
(boolean #f)
"The image to use for the OCI backed Shepherd service."))
(define (gf-serialize-grafana-smtp-configuration field-name value)
#~(string-append
"[smtp]\n"
#$(serialize-configuration
value grafana-smtp-configuration-fields)))
(define-configuration grafana-smtp-configuration
(enabled?
(boolean #f)
"Whether to enable Grafana's email alerting.")
(host
(string "smtp.example.org:587")
"The connection string representing your SMTP server.")
(user
(string "you@example.org")
"The email used to authenticate with the SMTP server.")
(password
(string "")
"The password used to authenticate with the SMTP server.")
(from-address
(string "alert@example.org")
"The sender of the email alerts Grafana will send."))
(define (gf-serialize-grafana-configuration configuration)
(mixed-text-file
"grafana.ini"
(serialize-configuration
configuration grafana-configuration-fields)))
(define (gf-serialize-string field-name value)
value)
(define-maybe string)
(define-configuration grafana-configuration
(server
(grafana-server-configuration (grafana-server-configuration))
"grafana.ini's [server] section.")
(smtp
(grafana-smtp-configuration (grafana-smtp-configuration))
"grafana.ini's [smtp] section.")
(extra-content
(string "")
"Everything you want to manually add to grafana.ini.")
(prefix gf-))
(define-configuration grafana-configuration
(datadir
(string "/var/lib/grafana")
"The directory where grafana writes state.")
(image
(string grafana-image)
"The image to use for the OCI backed Shepherd service.")
(port
(string "3000")
"This host port will be mapped onto the Grafana configured port inside the container.")
(grafana.ini
(grafana-configuration (grafana-configuration))
"This field will be serialized as graphana.ini.")
(network
(maybe-string)
"The docker network where the grafana container will be attached. When equal
to \"host\" the @code{port} field will be ignored.")
(no-serialization))
(define %grafana-accounts
(list (user-account
(name "grafana")
(comment "Grafana's Service Account")
(uid 1001)
(group "root")
(supplementary-groups '("tty"))
(system? #t)
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
(define (%grafana-activation config)
"Return an activation gexp for Grafana."
(let* ((datadir (grafana-configuration-datadir config))
(grafana.ini
(mixed-text-file
"grafana.ini"
(serialize-configuration (grafana-configuration-grafana.ini config)
grafana-configuration-fields))))
#~(begin
(use-modules (guix build utils))
(let* ((user (getpwnam "grafana"))
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir #$datadir))
;; Setup datadir
(mkdir-p datadir)
(chown datadir uid gid)
;; Activate configuration
(activate-special-files
'(("/etc/grafana/grafana.ini"
#$grafana.ini)))))))
(define grafana-configuration->container-configuration
(lambda (config)
(let* ((datadir
(grafana-configuration-datadir config))
(grafana.ini (grafana-configuration-grafana.ini config))
(network
(grafana-configuration-network config))
(image
(grafana-configuration-image config))
(port
(grafana-configuration-port config))
(container-config
(container-configuration
(image image)
(ports
`((,port . "3000")))
(volumes
`((,datadir . "/var/lib/grafana")
;; Needed because grafana.ini is a symlink to an item in the store.
("/gnu/store" . "/gnu/store")
("/etc/grafana/grafana.ini" . "/opt/bitnami/grafana/conf/grafana.ini"))))))
(list
(if (maybe-value-set? network)
(container-configuration
(inherit container-config)
(network network))
container-config)))))
(define grafana-service-type
(service-type (name 'grafana)
(extensions (list (service-extension container-service-type
grafana-configuration->container-configuration)
(service-extension account-service-type
(const %grafana-accounts))
(service-extension activation-service-type
%grafana-activation)))
(default-value (grafana-configuration))
(description
"Grafana as Shepherd Service.")))

View file

@ -0,0 +1,143 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;; via https://git.sr.ht/~fishinthecalculator/gocix/tree/main/item/modules/oci/services/prometheus.scm
(define-module (zzkt services prometheus)
#:use-module (gnu packages admin)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu services docker)
#:use-module (gnu system shadow)
#:use-module (guix gexp)
#:export (prometheus-service-type
prometheus-configuration
prometheus-configuration?
prometheus-configuration-fields
prometheus-configuration-datadir
prometheus-configuration-network
prometheus-configuration-file
prometheus-configuration-image
prometheus-configuration-port
prometheus-configuration->container-configuration
%prometheus-accounts
%prometheus-activation))
(define prometheus-tag
"v2.45.0")
(define prometheus-image
(string-append "prom/prometheus:" prometheus-tag))
(define prometheus-file
(plain-file "prometheus.yml"
"global:
scrape_interval: 30s
scrape_timeout: 12s
scrape_configs:
- job_name: prometheus
metrics_path: /metrics
static_configs:
- targets: ['localhost:9090','localhost:9100']\n"))
(define-maybe string)
(define-configuration prometheus-configuration
(datadir
(string "/var/lib/prometheus")
"The directory where prometheus writes state.")
(file
(file-like prometheus-file)
"The configuration file to use for the OCI backed Shepherd service.")
(image
(string prometheus-image)
"The image to use for the OCI backed Shepherd service.")
(network
(maybe-string)
"The docker network where the grafana container will be attached. When equal
to \"host\" the @code{port} field will be ignored.")
(port
(string "9000")
"This host port will be mapped onto the Prometheus dashboard configured port
inside the container.")
(metrics-port
(string "9090")
"This host port will be mapped onto the Prometheus health endpoint configured
port inside the container.")
(no-serialization))
(define %prometheus-accounts
(list (user-group
(name "prometheus")
(id 65534)
(system? #t))
(user-account
(name "prometheus")
(comment "Prometheus's Service Account")
(uid 65534)
(group "prometheus")
(supplementary-groups '("tty"))
(system? #t)
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
(define (%prometheus-activation config)
"Return an activation gexp for Prometheus."
(let ((datadir (prometheus-configuration-datadir config)))
#~(begin
(use-modules (guix build utils))
(let* ((user (getpwnam "prometheus"))
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir #$datadir))
(mkdir-p datadir)
(chown datadir uid gid)))))
(define prometheus-configuration->container-configuration
(lambda (config)
(let* ((datadir
(prometheus-configuration-datadir config))
(network
(prometheus-configuration-network config))
(image
(prometheus-configuration-image config))
(port
(prometheus-configuration-port config))
(metrics-port
(prometheus-configuration-metrics-port config))
(prometheus.yml
(prometheus-configuration-file config))
(container-config
(container-configuration
(command
'("--web.enable-lifecycle"
"--config.file=/etc/prometheus/prometheus.yml"
"--web.enable-admin-api"))
(image image)
(ports
`((,port . "9000")
(,metrics-port . "9090")))
(volumes
`((,datadir . "/prometheus")
(,prometheus.yml . "/etc/prometheus/prometheus.yml:ro"))))))
(list
(if (maybe-value-set? network)
(container-configuration
(inherit container-config)
(network network))
container-config)))))
(define prometheus-service-type
(service-type (name 'prometheus)
(extensions (list (service-extension container-service-type
prometheus-configuration->container-configuration)
(service-extension account-service-type
(const %prometheus-accounts))
(service-extension activation-service-type
%prometheus-activation)))
(default-value (prometheus-configuration))
(description
"Prometheus as a Shepherd Service.")))

View file

@ -0,0 +1,230 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;; via https://git.sr.ht/~fishinthecalculator/gocix/tree/main/item/modules/oci/services/grafana.scm
;; and see also https://fishinthecalculator.me/blog/monitor-your-guix-system-with-grafana.html
(define-module (zzkt services grafana)
#:use-module (gnu packages admin)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu services docker)
#:use-module (gnu system shadow)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 string-fun)
#:export (grafana-service-type
grafana-configuration
grafana-configuration?
grafana-configuration-fields
grafana-configuration-datadir
grafana-configuration-image
grafana-configuration-port
grafana-configuration-grafana.ini
grafana-configuration-network
grafana-configuration->container-configuration
%grafana-accounts
%grafana-activation
grafana-configuration
grafana-configuration?
grafana-configuration-fields
grafana-configuration-server
grafana-configuration-smtp
grafana-configuration-extra-content
grafana-server-configuration
grafana-server-configuration?
grafana-server-configuration-fields
grafana-server-configuration-root-url
grafana-server-configuration-serve-from-subpath?
grafana-smtp-configuration
grafana-smtp-configuration?
grafana-smtp-configuration-fields
grafana-smtp-configuration-enabled?
grafana-smtp-configuration-host
grafana-smtp-configuration-user
grafana-smtp-configuration-password
grafana-smtp-configuration-from-address))
;; Some of this code comes from the Guix manual.
;; Check it out! It's pretty cool.
(define grafana-tag
"10.1.5")
(define grafana-image
(string-append "bitnami/grafana:" grafana-tag))
;; Turn field names, which are Scheme symbols into strings
(define (uglify-field-name field-name)
(string-replace-substring
(string-replace-substring
(symbol->string field-name) "?" "") "-" "_"))
(define (serialize-string field-name value)
#~(string-append #$(uglify-field-name field-name) " = " #$value "\n"))
(define (serialize-integer field-name value)
(serialize-string field-name (number->string value)))
(define (serialize-boolean field-name value)
(serialize-string field-name (if value "true" "false")))
(define (gf-serialize-grafana-server-configuration field-name value)
#~(string-append
"[server]\n"
#$(serialize-configuration
value grafana-server-configuration-fields)))
(define-configuration grafana-server-configuration
(domain
(string "example.org")
"The public host where grafana will be exposed.")
(root-url
(string "%(protocol)s://%(domain)s:%(http_port)s/")
"The url where grafana will be exposed.")
(serve-from-sub-path?
(boolean #f)
"The image to use for the OCI backed Shepherd service."))
(define (gf-serialize-grafana-smtp-configuration field-name value)
#~(string-append
"[smtp]\n"
#$(serialize-configuration
value grafana-smtp-configuration-fields)))
(define-configuration grafana-smtp-configuration
(enabled?
(boolean #f)
"Whether to enable Grafana's email alerting.")
(host
(string "smtp.example.org:587")
"The connection string representing your SMTP server.")
(user
(string "you@example.org")
"The email used to authenticate with the SMTP server.")
(password
(string "")
"The password used to authenticate with the SMTP server.")
(from-address
(string "alert@example.org")
"The sender of the email alerts Grafana will send."))
(define (gf-serialize-grafana-configuration configuration)
(mixed-text-file
"grafana.ini"
(serialize-configuration
configuration grafana-configuration-fields)))
(define (gf-serialize-string field-name value)
value)
(define-maybe string)
(define-configuration grafana-configuration
(server
(grafana-server-configuration (grafana-server-configuration))
"grafana.ini's [server] section.")
(smtp
(grafana-smtp-configuration (grafana-smtp-configuration))
"grafana.ini's [smtp] section.")
(extra-content
(string "")
"Everything you want to manually add to grafana.ini.")
(prefix gf-))
(define-configuration grafana-configuration
(datadir
(string "/var/lib/grafana")
"The directory where grafana writes state.")
(image
(string grafana-image)
"The image to use for the OCI backed Shepherd service.")
(port
(string "3000")
"This host port will be mapped onto the Grafana configured port inside the container.")
(grafana.ini
(grafana-configuration (grafana-configuration))
"This field will be serialized as graphana.ini.")
(network
(maybe-string)
"The docker network where the grafana container will be attached. When equal
to \"host\" the @code{port} field will be ignored.")
(no-serialization))
(define %grafana-accounts
(list (user-account
(name "grafana")
(comment "Grafana's Service Account")
(uid 1001)
(group "root")
(supplementary-groups '("tty"))
(system? #t)
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
(define (%grafana-activation config)
"Return an activation gexp for Grafana."
(let* ((datadir (grafana-configuration-datadir config))
(grafana.ini
(mixed-text-file
"grafana.ini"
(serialize-configuration (grafana-configuration-grafana.ini config)
grafana-configuration-fields))))
#~(begin
(use-modules (guix build utils))
(let* ((user (getpwnam "grafana"))
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir #$datadir))
;; Setup datadir
(mkdir-p datadir)
(chown datadir uid gid)
;; Activate configuration
(activate-special-files
'(("/etc/grafana/grafana.ini"
#$grafana.ini)))))))
(define grafana-configuration->container-configuration
(lambda (config)
(let* ((datadir
(grafana-configuration-datadir config))
(grafana.ini (grafana-configuration-grafana.ini config))
(network
(grafana-configuration-network config))
(image
(grafana-configuration-image config))
(port
(grafana-configuration-port config))
(container-config
(container-configuration
(image image)
(ports
`((,port . "3000")))
(volumes
`((,datadir . "/var/lib/grafana")
;; Needed because grafana.ini is a symlink to an item in the store.
("/gnu/store" . "/gnu/store")
("/etc/grafana/grafana.ini" . "/opt/bitnami/grafana/conf/grafana.ini"))))))
(list
(if (maybe-value-set? network)
(container-configuration
(inherit container-config)
(network network))
container-config)))))
(define grafana-service-type
(service-type (name 'grafana)
(extensions (list (service-extension container-service-type
grafana-configuration->container-configuration)
(service-extension account-service-type
(const %grafana-accounts))
(service-extension activation-service-type
%grafana-activation)))
(default-value (grafana-configuration))
(description
"Grafana as Shepherd Service.")))

View file

@ -0,0 +1,143 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;; via https://git.sr.ht/~fishinthecalculator/gocix/tree/main/item/modules/oci/services/prometheus.scm
(define-module (zzkt services prometheus)
#:use-module (gnu packages admin)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu services docker)
#:use-module (gnu system shadow)
#:use-module (guix gexp)
#:export (prometheus-service-type
prometheus-configuration
prometheus-configuration?
prometheus-configuration-fields
prometheus-configuration-datadir
prometheus-configuration-network
prometheus-configuration-file
prometheus-configuration-image
prometheus-configuration-port
prometheus-configuration->container-configuration
%prometheus-accounts
%prometheus-activation))
(define prometheus-tag
"v2.45.0")
(define prometheus-image
(string-append "prom/prometheus:" prometheus-tag))
(define prometheus-file
(plain-file "prometheus.yml"
"global:
scrape_interval: 30s
scrape_timeout: 12s
scrape_configs:
- job_name: prometheus
metrics_path: /metrics
static_configs:
- targets: ['localhost:9090','localhost:9100']\n"))
(define-maybe string)
(define-configuration prometheus-configuration
(datadir
(string "/var/lib/prometheus")
"The directory where prometheus writes state.")
(file
(file-like prometheus-file)
"The configuration file to use for the OCI backed Shepherd service.")
(image
(string prometheus-image)
"The image to use for the OCI backed Shepherd service.")
(network
(maybe-string)
"The docker network where the grafana container will be attached. When equal
to \"host\" the @code{port} field will be ignored.")
(port
(string "9000")
"This host port will be mapped onto the Prometheus dashboard configured port
inside the container.")
(metrics-port
(string "9090")
"This host port will be mapped onto the Prometheus health endpoint configured
port inside the container.")
(no-serialization))
(define %prometheus-accounts
(list (user-group
(name "prometheus")
(id 65534)
(system? #t))
(user-account
(name "prometheus")
(comment "Prometheus's Service Account")
(uid 65534)
(group "prometheus")
(supplementary-groups '("tty"))
(system? #t)
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
(define (%prometheus-activation config)
"Return an activation gexp for Prometheus."
(let ((datadir (prometheus-configuration-datadir config)))
#~(begin
(use-modules (guix build utils))
(let* ((user (getpwnam "prometheus"))
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir #$datadir))
(mkdir-p datadir)
(chown datadir uid gid)))))
(define prometheus-configuration->container-configuration
(lambda (config)
(let* ((datadir
(prometheus-configuration-datadir config))
(network
(prometheus-configuration-network config))
(image
(prometheus-configuration-image config))
(port
(prometheus-configuration-port config))
(metrics-port
(prometheus-configuration-metrics-port config))
(prometheus.yml
(prometheus-configuration-file config))
(container-config
(container-configuration
(command
'("--web.enable-lifecycle"
"--config.file=/etc/prometheus/prometheus.yml"
"--web.enable-admin-api"))
(image image)
(ports
`((,port . "9000")
(,metrics-port . "9090")))
(volumes
`((,datadir . "/prometheus")
(,prometheus.yml . "/etc/prometheus/prometheus.yml:ro"))))))
(list
(if (maybe-value-set? network)
(container-configuration
(inherit container-config)
(network network))
container-config)))))
(define prometheus-service-type
(service-type (name 'prometheus)
(extensions (list (service-extension container-service-type
prometheus-configuration->container-configuration)
(service-extension account-service-type
(const %prometheus-accounts))
(service-extension activation-service-type
%prometheus-activation)))
(default-value (prometheus-configuration))
(description
"Prometheus as a Shepherd Service.")))