- Description:
- Utilities to serialize a GNU Guix channel
- Last Change:
- Clone URL:
git@git.quintet.in:dhruvin/doug
Commit Briefs
Make REUSE compliant (main)
Refine the purpose of doug
This moves doug/utils.scm to doug.scm. Users can change their import from (doug utils) to just (doug).
Add guix-package?, and missing references
- guix-package?: checks if a package belongs to guix/ or gnu/ paths. - references: - android-repo - bzr - cvs - svn - svn-multi - license: fix a case where it may be #f - properties: serialize them using object->string as a wordaround
Branches
Tags
Tree
.reuse/ | |
LICENSES/ | |
README.md | commits | blame |
doug.scm | commits | blame |
README.md
# Doug Utilities to serialize a GNU Guix channel ## Usage To serialize all packages available in current profile except packages from the [guix](https://git.savannah.gnu.org/git/guix.git) channel: ```scheme (use-modules (json)) (use-modules (gnu packages)) (use-modules (doug)) (scm->json `((packages . ,(list->vector (fold-packages (lambda (p ps) (cons (package->alist p) ps)) '() #:select? (negate guix-package?))))) #:pretty #t) ``` Above code will output a json object below: ```json { "packages": [ { "name": "...", "version": "...", "...": "..." } ] } ``` ### In the wild #### To filter official guix packages using `guix-package?` function - [~whereiseveryone/guixrus](https://git.sr.ht/~whereiseveryone/guixrus/commit/e5283f49dc76969317e8e97426bcb1c57848c968#scripts/lint-1-17) - [~whereiseveryone/website](https://git.sr.ht/~whereiseveryone/website/commit/0b6fe9d02e18292b875de730aa0ebacd65289dfd#guixrus.scm-1-90) ## License [GPL-3.0-or-later](./LICENSES/GPL-3.0-or-later.txt)