From f85ccf88efbe1250e472e95cce7130c8403d4f3c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 27 Aug 2015 14:05:10 +0200 Subject: gnu: Add perl-czplib. * gnu/packages/perl.scm (perl-czplib): New variable. --- gnu/packages/perl.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'gnu/packages/perl.scm') diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f784798bd3..c528516c15 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1051,6 +1051,46 @@ (define-public perl-crypt-randpasswd Password Generator\".") (license (package-license perl)))) +(define-public perl-czplib + (package + (name "perl-czplib") + (version "1.0.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/czplib/czplib.v" + version ".tgz")) + (sha256 + (base32 + "12kln8l5h406r1ss6zbazgcshmys9nvabkrhvk2zwrrgl1saq1kf")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove .git directory + (delete-file-recursively ".git") + #t)))) + (build-system perl-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (copy-recursively "." + (string-append (assoc-ref outputs "out") + "/plib/perl5/site_perl/" + ,(package-version perl) + "/czplib/")) + #t))))) + (home-page "http://sourceforge.net/projects/czplib/") + (synopsis "Library for genomic analysis") + (description "Chaolin Zhang's Perl Library (czplib) contains assorted +functions and data structures for processing and analysing genomic and +bioinformatics data.") + (license gpl3+))) + (define-public perl-data-dump (package (name "perl-data-dump") -- cgit v1.2.3 From 1cd4027cfdb82d43321c9c20f8bfad97cbd74413 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Fri, 7 Aug 2015 00:10:43 +0200 Subject: ui: Add package-description-string. Provide support for Texinfo's markup in package description. * guix/ui.scm (%text-width): New parameter. (texi->plain-text): New variable. (package->recutils): Use them. (package-description-string): New variable. * emacs/guix-main.scm (%package-param-alist): Use it. * gnu/packages/perl.scm (perl-devel-globaldestruction) (perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup. * gnu/packages/python.scm (python2-empy): Likewise. --- emacs/guix-main.scm | 2 +- gnu/packages/perl.scm | 6 +++--- gnu/packages/python.scm | 2 +- guix/ui.scm | 50 ++++++++++++++++++++++++++++++++++++------------- 4 files changed, 42 insertions(+), 18 deletions(-) (limited to 'gnu/packages/perl.scm') diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 623da884f6..c9b84d36d9 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -293,7 +293,7 @@ (define %package-param-alist (license . ,package-license-names) (source . ,package-source-names) (synopsis . ,package-synopsis) - (description . ,package-description) + (description . ,package-description-string) (home-url . ,package-home-page) (outputs . ,package-outputs) (non-unique . ,(negate package-unique?)) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index c528516c15..12fed2b870 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1705,7 +1705,7 @@ (define-public perl-devel-globaldestruction (home-page "http://search.cpan.org/dist/Devel-GlobalDestruction") (synopsis "Provides equivalent of ${^GLOBAL_PHASE} eq 'DESTRUCT' for older perls") (description "Devel::GlobalDestruction provides a function returning the -equivalent of \"${^GLOBAL_PHASE} eq 'DESTRUCT'\" for older perls.") +equivalent of \"$@{^GLOBAL_PHASE@} eq 'DESTRUCT'\" for older perls.") (license (package-license perl)))) (define-public perl-devel-lexalias @@ -1949,7 +1949,7 @@ (define-public perl-eval-closure eval is not without its issues however - it's difficult to control the scope it's used in (which determines which variables are in scope inside the eval), and it's easy to miss compilation errors, since eval catches them and sticks -them in $@ instead. This module attempts to solve these problems. It +them in $@@ instead. This module attempts to solve these problems. It provides an eval_closure function, which evals a string in a clean environment, other than a fixed list of specified variables. Compilation errors are rethrown automatically.") @@ -1993,7 +1993,7 @@ (define-public perl-exporter-lite (description "Exporter::Lite is an alternative to Exporter, intended to provide a lightweight subset of the most commonly-used functionality. It supports -import(), @EXPORT and @EXPORT_OK and not a whole lot else.") +import(), @@EXPORT and @@EXPORT_OK and not a whole lot else.") (home-page (string-append "http://search.cpan.org/~neilb/" "Exporter-Lite-" version)) (license (package-license perl)))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f9ad95118b..feddd1a46a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1174,7 +1174,7 @@ (define-public python2-empy "EmPy is a system for embedding Python expressions and statements in template text; it takes an EmPy source file, processes it, and produces output. This is accomplished via expansions, which are special signals to the -EmPy system and are set off by a special prefix (by default the at sign, @). +EmPy system and are set off by a special prefix (by default the at sign, @@). EmPy can expand arbitrary Python expressions and statements in this way, as well as a variety of special forms. Textual data not explicitly delimited in this way is sent unaffected to the output, allowing Python to be used in diff --git a/guix/ui.scm b/guix/ui.scm index 2f757547cf..ca5b844a43 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Mark H Weaver ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015 Alex Kost +;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2014 Deck Pickard ;;; ;;; This file is part of GNU Guix. @@ -45,6 +46,9 @@ (define-module (guix ui) #:use-module (ice-9 regex) #:autoload (system repl repl) (start-repl) #:autoload (system repl debug) (make-debug stack->vector) + #:use-module (texinfo) + #:use-module (texinfo plain-text) + #:use-module (texinfo string-utils) #:export (_ N_ P_ @@ -69,6 +73,7 @@ (define-module (guix ui) switch-symlinks config-directory fill-paragraph + package-description-string string->recutils package->recutils package-specification->name+version+output @@ -775,6 +780,28 @@ (define (maybe-break chr result) ;;; Packages. ;;; +(define %text-width + (make-parameter (or (and=> (getenv "WIDTH") string->number) + 80))) + +(set! (@@ (texinfo plain-text) wrap*) + ;; XXX: Monkey patch this private procedure to let 'package->recutils' + ;; parameterize the fill of description field correctly. + (lambda strings + (let ((indent (fluid-ref (@@ (texinfo plain-text) *indent*)))) + (fill-string (string-concatenate strings) + #:line-width (%text-width) #:initial-indent indent + #:subsequent-indent indent)))) + +(define (texi->plain-text str) + "Return a plain-text representation of texinfo fragment STR." + (stexi->plain-text (texi-fragment->stexi str))) + +(define (package-description-string package) + "Return a plain-text representation of PACKAGE description field." + (and=> (package-description package) + (compose texi->plain-text P_))) + (define (string->recutils str) "Return a version of STR where newlines have been replaced by newlines followed by \"+ \", which makes for a valid multi-line field value in the @@ -787,18 +814,9 @@ (define (string->recutils str) '() str))) -(define* (package->recutils p port - #:optional (width (or (and=> (getenv "WIDTH") - string->number) - 80))) +(define* (package->recutils p port #:optional (width (%text-width))) "Write to PORT a `recutils' record of package P, arranging to fit within WIDTH columns." - (define (description->recutils str) - (let ((str (P_ str))) - (string->recutils - (fill-paragraph str width - (string-length "description: "))))) - (define (dependencies->recutils packages) (let ((list (string-join (map package-full-name (sort packages package (package-synopsis p) P_) ""))) - (format port "description: ~a~%" - (and=> (package-description p) description->recutils)) - (newline port)) + (format port "~a~2%" + (string->recutils + (string-trim-right + (parameterize ((%text-width width)) + (texi->plain-text + (string-append "description: " + (or (and=> (package-description p) P_) + "")))) + #\newline)))) (define (string->generations str) "Return the list of generations matching a pattern in STR. This function -- cgit v1.2.3 From bb1ba6b8f75c6b5b6cd23edf7c36068211a96c93 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 9 Jul 2015 19:14:22 -0500 Subject: gnu: Add perl-date-manip. * gnu/packages/perl.scm (perl-date-manip): New variable. --- gnu/packages/perl.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/perl.scm') diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 12fed2b870..5bae3f31c8 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1332,6 +1332,31 @@ (define-public perl-date-calc-xs Date::Calc.") (license (list (package-license perl) lgpl2.0+)))) +(define-public perl-date-manip + (package + (name "perl-date-manip") + (version "6.50") + (source + (origin + (method url-fetch) + (uri (string-append "https://cpan.metacpan.org/authors/id/S/SB/SBECK/" + "Date-Manip-" version ".tar.gz")) + (sha256 + (base32 + "0zd0wbf91i49753rnf7m1lw197hdl5r97mxy0n43zdmcmhvkb3qq")))) + (build-system perl-build-system) + (arguments + ;; Tests would require tzdata for timezone information, but tzdata is in + ;; (gnu packages base) which would create a circular dependency. TODO: + ;; Maybe put this package elsewhere so we can turn on tests. + '(#:tests? #f)) + (home-page "http://search.cpan.org/dist/Date-Manip") + (synopsis "Date manipulation routines") + (description "Date::Manip is a series of modules for common date/time +operations, such as comparing two times, determining a date a given amount of +time from another, or parsing international times.") + (license (package-license perl)))) + (define-public perl-datetime (package (name "perl-datetime") -- cgit v1.2.3