From 48d843c54b975935c951dbf36e1d156dc434e380 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Sat, 29 Oct 2022 17:25:53 +0200 Subject: [PATCH] Initializing the channel with module sjw --- README.md | 46 ++++++++++++++++++++++ loom/packages/sjw.scm | 90 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 README.md create mode 100644 loom/packages/sjw.scm diff --git a/README.md b/README.md new file mode 100644 index 0000000..4165830 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# The loom + +Here is a channel for my [guix](https://guix.gnu.org/) packages. Everything is +free software and candidate for an eventual release in the official channel but +this repository is meant as a convenient upstream for fast publication (and +hence can not be expected to be as stable as the official channel). + +## How to use + +### The proper way + +The following snippet declares this channel for `guix` (mind the `branch` field): + +```guile +(channel + (name 'loom) + (url "https://git.marvid.fr/Tissevert/loom.git") + (branch "main")) +``` + +Following the [official +instructions](https://guix.gnu.org/fr/manual/devel/en/html_node/Specifying-Additional-Channels.html), +add it to your `channels.scm` (which should be located at +`~/.config/guix/channels.scm`, create it if it doesn't exist). If this is your +first additional channel, your new `channels.scm` should look like this: + +```guile +(cons* (channel + (name 'loom) + (url "https://git.marvid.fr/Tissevert/loom.git") + (branch "main")) + %default-channels) +``` + +Then just `guix pull` and my packages should pop up in a search. + +### Quick'n'dirty + +If you just want to try a package without modifying your local `guix` +configuration, just download this repository and use the `--load-path` (short +`-L`) option with the path to your local copy as argument. For instance, from +within the copy, this should return results: + +``` +$ guix search -L . sjw +``` diff --git a/loom/packages/sjw.scm b/loom/packages/sjw.scm new file mode 100644 index 0000000..9bc484e --- /dev/null +++ b/loom/packages/sjw.scm @@ -0,0 +1,90 @@ +(define-module (loom packages sjw) + #:use-module ((gnu packages haskell-xyz) + #:select (ghc-attoparsec ghc-random ghc-optparse-applicative)) + #:use-module ((guix build-system copy) + #:select (copy-build-system)) + #:use-module ((guix build-system haskell) + #:select (haskell-build-system)) + #:use-module ((guix git-download) + #:select (git-fetch git-file-name git-reference)) + #:use-module ((guix licenses) + #:select (gpl3+)) + #:use-module ((guix packages) + #:select (base32 origin package search-path-specification))) + +(define-public sjw + (package + (name "sjw") + (version "0.1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.marvid.fr/Tissevert/SJW") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jhwsxhqmsifrafqbil1yj3d83sjb8fliwbhayc1wb904ih99k45")))) + (build-system haskell-build-system) + (inputs (list ghc-attoparsec ghc-random ghc-optparse-applicative)) + (native-search-paths + (list (search-path-specification + (variable "SJW_PATH") + (files '("lib/SJW"))))) + (home-page "https://git.marvid.fr/Tissevert/SJW") + (synopsis "The Simple Javascript Wrench") + (description + "SJW is a very simple tool to pack several JS modules into a single + script. It doesn't really do proper compilation work (yet) except + resolving the modules dependencies and detecting import loops but it + provides each module with an independent execution context in the + resulting script.") + (license gpl3+))) + +(define-public sjw-unitjs + (package + (name "sjw-unitjs") + (version "0.1.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.marvid.fr/Tissevert/UnitJS") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1g6f5zny2zhwfysijws621552b6sm6jm3fr254bczsxlpibnxygm")))) + (build-system copy-build-system) + (arguments + '(#:install-plan '(("src" "lib/SJW/unitJS")))) + (home-page "https://git.marvid.fr/Tissevert/UnitJS") + (synopsis "The Simple Javascript Wrench.") + (description + "A collection of JS modules to write simple web applications. It covers + the basics, providing asynchronous operations without any need for + promises-support from the browser as well as primitives to create DOM + elements and basic functional-programming tooling.") + (license gpl3+))) + +(define-public sjw-wtk + (package + (name "sjw-wtk") + (version "0.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.marvid.fr/Tissevert/WTK") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0d51j2dcr4p0bpy963zzyj0711314xcadkrrg1vb0y78xs3gdqvy")))) + (build-system copy-build-system) + (arguments + '(#:install-plan '(("src" "lib/SJW/WTK")))) + (home-page "https://git.marvid.fr/Tissevert/WTK") + (synopsis "The Web Tool Kit") + (description + "The Web Tool Kit aims at providing high-level abstraction modules to + build web applications easily.") + (license gpl3+)))