summaryrefslogtreecommitdiff
path: root/guix/base32.scm
AgeCommit message (Collapse)Author
2021-09-21base32: Work around (ash x N) miscompilation at '-O1' and below.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/50696>. Reported by Marius Bakke <marius@gnu.org>. * guix/base32.scm (bit-field): Introduce 'minus-start' syntax and use it.
2021-09-10base32: Provide an open-coded 'bit-field'.Ludovic Courtès
This improves the throughput of 'bytevector->base32-string' a bit. * guix/base32.scm (bit-field): New macro.
2017-07-21base32: Export the base32 charsets.Ludovic Courtès
* guix/base32.scm (%nix-base32-charset, %rfc4648-base32-charset): New variables.
2015-05-31base32: Use a custom error condition instead of 'misc-error'.Ludovic Courtès
Suggested by Christopher Allan Webber <cwebber@dustycloud.org>. * guix/base32.scm (&invalid-base32-character): New error condition. (make-base32-string->bytevector): Use it instead of 'error'. * tests/base32.scm ("&invalid-base32-character"): New test.
2013-01-06Update license headers.Ludovic Courtès
Change all license headers, except guix/build/* and ld-wrapper.scm, with this code: (use-modules (guix build utils) (srfi srfi-1)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (remove (lambda (f) (or (string-contains f ".tar.") (string-contains f ".git/") (string-contains f ".so") (string-suffix? ".o" f) (string-suffix? ".a" f) (string-suffix? ".go" f) (string-suffix? ".pdf" f) (string-suffix? ".png" f) (string-suffix? ".info" f) (equal? (basename f) "guix-daemon") (equal? (basename f) "nix-setuid-helper") (string-contains f "nix-upstream/") (string-contains f "distro/packages/bootstrap/"))) (find-files "." "\\.[a-z]+$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) Change headers using C-style comments manually.
2012-11-11Move base32 code to (guix base32).Ludovic Courtès
* guix/utils.scm (bytevector-quintet-ref, bytevector-quintet-ref-right, bytevector-quintet-length, bytevector-quintet-fold, bytevector-quintet-fold-right, make-bytevector->base32-string, %nix-base32-chars, %rfc4648-base32-chars, bytevector->base32-string, bytevector->nix-base32-string, bytevector-quintet-set!, bytevector-quintet-set-right!, base32-string-unfold, base32-string-unfold-right, make-base32-string->bytevector, base32-string->bytevector, nix-base32-string->bytevector): Move to... * guix/base32.scm: ... here. New file. * tests/utils.scm (%nix-hash, "bytevector->base32-string", "base32-string->bytevector", "nix-base32-string->bytevector", "sha256 & bytevector->base32-string"): Move to... * tests/base32.scm: ... here. New file * guix-download.in, guix/derivations.scm, guix/packages.scm, guix/snix.scm, tests/builders.scm, tests/derivations.scm: Adjust accordingly. * guix.scm (%public-modules): Add `base32'.