From 1a1798a99b09ef7df0f183d99ea9a4717b9406d7 Mon Sep 17 00:00:00 2001 From: divoplade Date: Thu, 22 Oct 2020 01:14:27 +0200 Subject: [PATCH] Add guile-mkdir-p As there is no guile function to create directories recursively, a lot of packages bundle their own. For instance, Guile as Shell or Guix. This also happens to me, as I need this function in any substantial program. --- gnu/packages/guile-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 88c0586dc9..2504deb3af 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4007,3 +4007,42 @@ features not found in the standard read procedure such as a compatible mode with support for other RnRS standards and a tolerant mode that continues on errors.") (license license:expat))) + +(define-public guile-mkdir-p + (package + (name "guile-mkdir-p") + (version "1.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://code.divoplade.fr/mkdir-p.git") + (commit "83e955ba612369336a69fe50fe023ad14fbe5d7c"))) + (sha256 (base32 "01k20rjcv6p0spmw8ls776aar6bfw0jxw46d2n12w0cb2p79xjv8")) + (snippet + `(begin + (with-output-to-file ".tarball-version" + (lambda _ (format #t "~a~%" "1.0.1"))) + #t)))) + (build-system gnu-build-system) + (arguments `()) + (native-inputs + `(("guile" ,guile-3.0) + ("texinfo" ,texinfo) + ("autoconf" ,autoconf) + ("autoconf-archive" ,autoconf-archive) + ("automake" ,automake) + ("pkg-config" ,pkg-config) + ("gettext" ,gnu-gettext))) + (inputs `(("guile" ,guile-3.0))) + (propagated-inputs + `(("guile" ,guile-3.0))) + (synopsis "Implementation of a recursive mkdir for guile") + (description + "This package provides within the (mkdir-p) module the mkdir-p function +that tries to create the chain of directories recursively. It also provides +new versions of open-output-file, call-with-output-file and +with-output-to-file to create the directory of its argument if it does not +exist.") + (home-page "https://mkdir-p.divoplade.fr") + (license license:asl2.0))) -- 2.28.0