From c03ae1485da44ac75333f5c6dd1eef986cf8a167 Mon Sep 17 00:00:00 2001 From: humanitiesNerd Date: Mon, 10 Apr 2017 08:43:36 +0200 Subject: [PATCH] gnu: Add libxsl * gnu/packages/xml.scm (libxls): New variable. --- gnu/packages/xml.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 283d5112a..97bae98d1 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -39,6 +39,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages tls) #:use-module (gnu packages web) + #:use-module (gnu packages zip) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -1089,3 +1090,39 @@ files. It is designed to be fast and to handle large input files.") (define-public python2-defusedxml (package-with-python2 python-defusedxml)) + + +(define-public libxls + (package + (name "libxls") + (version "1.4.0") + (source (origin + (method url-fetch) + (uri (string-append "https://sourceforge.net/projects/" + name "/files/" name "-" + version ".zip")) + (sha256 + (base32 + "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'bootstrap + (lambda _ + (zero? (system* "bash" "bootstrap")))))) + ;; this causes the command xls2csv to be named libxls2csv. + ;; In this way it won't conflict with a python + ;; command by the same name, should a user install both + #:configure-flags '("--program-prefix" "lib")) + (native-inputs + `(("unzip" ,unzip) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (home-page "http://libxls.sourceforge.net/") + (synopsis "libxls reads excel files. It doesn't write them") + (description + "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format). +libxls cannot write Excel files.") + (license license:bsd-2))) -- 2.12.0