[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: gnu: Add trivial-file-size.
From: |
guix-commits |
Subject: |
08/09: gnu: Add trivial-file-size. |
Date: |
Mon, 7 Oct 2019 07:57:06 -0400 (EDT) |
ambrevar pushed a commit to branch master
in repository guix.
commit c6dd9cf7ffd968520e78c438f7064935c40e139d
Author: Pierre Neidhardt <address@hidden>
Date: Mon Oct 7 13:49:42 2019 +0200
gnu: Add trivial-file-size.
* gnu/packages/lisp.scm (cl-trivial-file-size, ecl-trivial-file-size,
sbcl-trivial-file-size): New variables.
---
gnu/packages/lisp.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 88261d5..031d172 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -7594,3 +7594,41 @@ special variables, especially in the presence of
threads.")
(define-public ecl-global-vars
(sbcl-package->ecl-package sbcl-global-vars))
+
+(define-public sbcl-trivial-file-size
+ (let ((commit "1c1d672a01a446ba0391dbb4ffc40be3b0476f23")
+ (revision "0"))
+ (package
+ (name "sbcl-trivial-file-size")
+ (version (git-version "0.0.0" revision commit))
+ (home-page "https://github.com/ruricolist/trivial-file-size")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17pp86c9zs4y7i1sh7q9gbfw9iqv6655k7fz8qbj9ly1ypgxp4qs"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("fiveam" ,sbcl-fiveam)))
+ (synopsis "Size of a file in bytes in Common Lisp")
+ (description
+ "The canonical way to determine the size of a file in bytes, using
Common Lisp,
+is to open the file with an element type of (unsigned-byte 8) and then
+calculate the length of the stream. This is less than ideal. In most cases
+it is better to get the size of the file from its metadata, using a system
+call.
+
+This library exports a single function, file-size-in-octets. It returns the
+size of a file in bytes, using system calls when possible.")
+ (license license:expat))))
+
+(define-public cl-trivial-file-size
+ (sbcl-package->cl-source-package sbcl-trivial-file-size))
+
+(define-public ecl-trivial-file-size
+ (sbcl-package->ecl-package sbcl-trivial-file-size))
- branch master updated (7d82e92 -> fa4bbd9), guix-commits, 2019/10/07
- 02/09: gnu: Add cl-fare-quasiquote., guix-commits, 2019/10/07
- 04/09: gnu: Add cl-fare-quasiquote-readtable., guix-commits, 2019/10/07
- 06/09: gnu: Add string-case., guix-commits, 2019/10/07
- 07/09: gnu: Add global-vars., guix-commits, 2019/10/07
- 09/09: gnu: Add trivial-macroexpand-all., guix-commits, 2019/10/07
- 03/09: gnu: Add fare-quasiquote-optima., guix-commits, 2019/10/07
- 08/09: gnu: Add trivial-file-size.,
guix-commits <=
- 01/09: gnu: sbcl-optima: Fix version number, guix-commits, 2019/10/07
- 05/09: gnu: Add cl-fare-quasiquote-extras., guix-commits, 2019/10/07