From a8317b348d4f5c6aaaac85b2f06c8be49ffdec4f Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sat, 6 Mar 2021 21:56:49 +0000 Subject: [PATCH] gnu: Add cl-diskspace * gnu/packages/lisp-xyz.scm: (sbcl-cl-diskspace, cl-diskspace, ecl-cl-diskspace): New variables. --- gnu/packages/lisp-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 48af024b17..2ec44c2b23 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -15094,3 +15094,48 @@ Lisp.") (define-public cl-mount-info (sbcl-package->cl-source-package sbcl-cl-mount-info)) + +(define-public sbcl-cl-diskspace + (let ((commit "2dce2d0387d58221c452bd76c7b9b7a7de81ef55") + (revision "1")) + (package + (name "sbcl-cl-diskspace") + (version (git-version "0.0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/muyinliu/cl-diskspace") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0l19hxqw6b8i5i1jdbr45k1xib9axcwdagsp3y8wkb35g6wwc0s7")))) + (build-system asdf-build-system/sbcl) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp" + (("grep") + (string-append (assoc-ref inputs "grep") "/bin/grep"))) + (substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp" + (("/bin/df") + (which "df"))) + #t))))) + (inputs + `(("cffi" ,sbcl-cffi) + ("grep" ,grep) + ("cl-ppcre" ,sbcl-cl-ppcre) ("grep" ,grep))) + (home-page "https://github.com/muyinliu/cl-diskspace") + (synopsis "List disks, get disk total/free/usable space information") + (description + "CL-DISKSPACE is a Common Lisp feature to list disks with +command line tool @code{df} and get disk space information using @code{statvfs}.") + (license license:isc)))) + +(define-public ecl-cl-diskspace + (sbcl-package->ecl-package sbcl-cl-diskspace)) + +(define-public cl-diskspace + (sbcl-package->cl-source-package sbcl-cl-diskspace)) -- 2.29.2