[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/11: gnu: Add guile-hashing.
From: |
guix-commits |
Subject: |
08/11: gnu: Add guile-hashing. |
Date: |
Wed, 11 Dec 2019 18:21:52 -0500 (EST) |
civodul pushed a commit to branch wip-system-bootstrap
in repository guix.
commit fb2db3d26d0894d64789c56c45d405f62a742d5a
Author: Ludovic Courtès <address@hidden>
Date: Wed Dec 11 17:26:00 2019 +0100
gnu: Add guile-hashing.
* gnu/packages/guile-xyz.scm (guile-hashing): New variable.
---
gnu/packages/guile-xyz.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 674b24e..f59750b 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2721,3 +2721,54 @@ tests being run, resulting clearer and more specific
output.")
comparing, and writing Semantic Versions. It also includes ranges in
the style of the Node Package Manager (NPM).")
(license license:gpl3+)))
+
+(define-public guile-hashing
+ (package
+ (name "guile-hashing")
+ (version "1.2.0")
+ (home-page "https://github.com/weinholt/hashing")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1362d3lmpv7slmv1zmr9wy8panq9sjr9787gc2hagd646mpsfpkl"))))
+ (build-system guile-build-system)
+ (arguments
+ `(#:modules ((guix build guile-build-system)
+ (guix build utils)
+ (srfi srfi-26)
+ (ice-9 ftw))
+ #:implicit-inputs? #f ;needs nothing but Guile
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'move-sls-files
+ (lambda _
+ ;; Move the source under hashing/ in order to match
+ ;; module names, and rename .sls files to .scm.
+ (define (target file)
+ (string-append "hashing/" file))
+
+ (define (sls->scm sls)
+ (string-append (string-drop-right sls 4)
+ ".scm"))
+
+ (mkdir "hashing")
+ (for-each (lambda (file)
+ (rename-file file (sls->scm file)))
+ (find-files "." "\\.sls$"))
+ (for-each (lambda (file)
+ (rename-file file (target file)))
+ (scandir "." (cut string-suffix? ".scm" <>)))
+ (rename-file "private" "hashing/private")
+ #t)))))
+ (native-inputs
+ `(("guile" ,guile-2.2)))
+ (synopsis "Cryprographic hash functions implemented in Scheme")
+ (description
+ "The @code{(hashing @dots{})} modules implement cryptographic hash
+functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256,
+SHA-512).")
+ (license license:expat)))
- branch wip-system-bootstrap created (now f97e759), guix-commits, 2019/12/11
- 01/11: utils: 'version-compare' delays 'dynamic-link' code., guix-commits, 2019/12/11
- 03/11: DRAFT gexp: Add 'raw-derivation-file'., guix-commits, 2019/12/11
- 02/11: monads: Add portability to Guile 2.0., guix-commits, 2019/12/11
- 04/11: DRAFT gexp: Add 'raw-derivation-closure'., guix-commits, 2019/12/11
- 07/11: guile-build-system: Add #:implicit-inputs., guix-commits, 2019/12/11
- 08/11: gnu: Add guile-hashing.,
guix-commits <=
- 10/11: DRAFT serialization: Avoid 'define-values', for the sake of Guile 2.0., guix-commits, 2019/12/11
- 05/11: DRAFT gexp: Add 'object-sources'., guix-commits, 2019/12/11
- 09/11: bootstrap: Add %bootstrap-guile+guild., guix-commits, 2019/12/11
- 11/11: system: bootstrap: Compute and print the result's hash., guix-commits, 2019/12/11
- 06/11: DRAFT system: Add (gnu system bootstrap)., guix-commits, 2019/12/11