From 406f726cfb857e8b845a45d38d8f7d04867bd126 Mon Sep 17 00:00:00 2001 From: phodina Date: Tue, 31 Aug 2021 11:15:16 +0000 Subject: gnu: Add date2name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (date2name): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7be4b6a1ff..3e839474b6 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -106,6 +106,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Hugo Lecomte ;;; Copyright © 2021 Franck Pérignon +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -26544,3 +26545,39 @@ a (rather superficial) static analysis, and constructs a directed graph of the objects in the combined source, and how they define or use each other. The graph can be output for rendering by GraphViz or yEd.") (license license:gpl2))) + +(define-public date2name + (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798") + (revision "1")) + (package + (name "date2name") + (version (git-version "0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/novoid/date2name") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bindir (string-append (assoc-ref outputs "out") "/bin")) + (binary (string-append bindir "/date2name"))) + (mkdir-p bindir) + (copy-file "date2name/__init__.py" binary) + (chmod binary #o555))))))) + (synopsis "Handling time-stamps and date-stamps in file names") + (description "By default, date2name gets the modification time of matching +files and directories and adds a datestamp in standard ISO 8601+ format +YYYY-MM-DD at the beginning of the file or directory name.") + (home-page "https://github.com/novoid/date2name") + (license license:gpl3+)))) -- cgit v1.2.3