all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 2/2] gnu: Add jrnl.
@ 2014-06-30  5:44 Eric Bavier
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Bavier @ 2014-06-30  5:44 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 27 bytes --]

[-- Attachment #2: 0002-gnu-Add-jrnl.patch --]
[-- Type: text/x-patch, Size: 8787 bytes --]

From 8cca0703e3bc6feba8a69a2e535bc025a712f7ae Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 30 Jun 2014 00:28:40 -0500
Subject: [PATCH 2/2] gnu: Add jrnl.

* gnu/packages/jrnl.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/python.scm (python-pycrypto, python-keyring, python-dateutil-2,
  python-parsedatetime, python-tzlocal): New variables.
* guix/licenses.scm (cc0): New variable.
---
 gnu/packages/python.scm |  169 ++++++++++++++++++++++++++++++++++++++++++++++-
 guix/licenses.scm       |    6 ++
 2 files changed, 173 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3c80e8e..83575cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -22,8 +22,9 @@
 
 (define-module (gnu packages python)
   #:use-module ((guix licenses)
-                #:select (bsd-3 bsd-style expat psfl x11 x11-style
-                          gpl2 gpl2+ lgpl2.1+))
+                #:select (asl2.0 bsd-3 bsd-style cc0 expat x11 x11-style
+                          gpl2 gpl2+ lgpl2.1+
+                          psfl public-domain))
   #:use-module ((guix licenses) #:select (zlib)
                                 #:renamer (symbol-prefix-proc 'license:))
   #:use-module (gnu packages)
@@ -36,6 +37,8 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sqlite)
+  #:use-module ((gnu packages zip) #:select (unzip))
+  #:use-module (gnu packages multiprecision)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -381,6 +384,80 @@ Python 3 support.")
   (package-with-python2 python-setuptools))
 
 
+(define-public python-pycrypto
+  (package
+    (name "python-pycrypto")
+    (version "2.6.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          "pycrypto/pycrypto-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     `(("python" ,python)
+       ("gmp" ,gmp)))
+    (arguments
+     `(#:phases
+       (alist-cons-before
+        'build 'set-build-env
+        ;; pycrypto runs an autoconf configure script behind the scenes
+        (lambda _
+          (setenv "CONFIG_SHELL" (which "bash")))
+        %standard-phases)))
+    (home-page "http://www.pycrypto.org/")
+    (synopsis "Cryptographic modules for Python")
+    (description
+     "Pycrypto is a collection of both secure hash functions (such as SHA256
+and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
+etc.). The package is structured to make adding new modules easy.")
+    (license public-domain)))
+
+(define-public python-keyring
+  (package
+    (name "python-keyring")
+    (version "3.8")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/k/"
+                          "keyring/keyring-" version ".zip"))
+      (sha256
+       (base32
+        "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python-setuptools" ,python-setuptools)
+       ("python-mock" ,python-mock)))
+    (inputs
+     `(("python-pycrypto" ,python-pycrypto)))
+    (arguments
+     `(#:tests? #f                      ;TODO: tests require pytest
+       #:phases
+       (alist-replace
+        'unpack
+        (lambda _
+          (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                      "/bin/unzip"))
+                (source (assoc-ref %build-inputs "source")))
+            (and (zero? (system* unzip source))
+                 (chdir (string-append "keyring-" ,version)))))
+        %standard-phases)))
+    (home-page "http://bitbucket.org/kang/python-keyring-lib")
+    (synopsis "Store and access your passwords safely")
+    (description
+     "The Python keyring lib provides a easy way to access the system keyring
+service from python. It can be used in any application that needs safe
+password storage.")
+    ;; "MIT" and PSF dual license
+    (license x11)))
+
 (define-public python-six
   (package
     (name "python-six")
@@ -406,6 +483,33 @@ Six supports every Python version since 2.5. It is contained in only one
 Python file, so it can be easily copied into your project.")
     (license (x11-style "file://LICENSE"))))
 
+(define-public python-dateutil-2
+  (package
+    (name "python-dateutil")
+    (version "2.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          name "/" name "-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-six" ,python-six)))
+    (home-page "http://labix.org/python-dateutil")
+    (synopsis
+     "Extensions to the standard datetime module, available in Python 2.3+")
+    (description
+     "The dateutil module provides powerful extensions to the standard
+datetime module, available in Python 2.3+.")
+    (license bsd-3)))
+
+(define-public python2-dateutil-2
+  (package-with-python2 python-dateutil-2))
+
 (define-public python-dateutil
   (package
     (name "python-dateutil")
@@ -432,6 +536,67 @@ datetime module, available in Python 2.3+.")
 (define-public python2-dateutil
   (package-with-python2 python-dateutil))
 
+(define-public python-parsedatetime
+  (package
+    (name "python-parsedatetime")
+    (version "1.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          "parsedatetime/parsedatetime-" version ".tar.gz"))
+      (sha256
+       (base32
+        "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (arguments `(#:tests? #f))          ;no test target
+    (home-page "http://github.com/bear/parsedatetime/")
+    (synopsis
+     "Parse human-readable date/time text")
+    (description
+     "Parse human-readable date/time text")
+    (license asl2.0)))
+
+(define-public python-tzlocal
+  (package
+    (name "python-tzlocal")
+    (version "1.1.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/t/"
+                          "tzlocal/tzlocal-" version ".zip"))
+      (sha256
+       (base32
+        "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python-setuptools" ,python-setuptools)))
+    (inputs `(("python-pytz" ,python-pytz)))
+    (arguments
+     `(#:phases
+       (alist-replace
+        'unpack
+        (lambda _
+          (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                      "/bin/unzip"))
+                (source (assoc-ref %build-inputs "source")))
+            (and (zero? (system* unzip source))
+                 (chdir (string-append "tzlocal-" ,version)))))
+        %standard-phases)))
+    (home-page "https://github.com/regebro/tzlocal")
+    (synopsis
+     "tzinfo object for the local timezone")
+    (description
+     "Tzlocal returns a tzinfo object with the local timezone information.
+This module attempts to fix a glaring hole in pytz, that there is no way to
+get the local timezone information, unless you know the zoneinfo name, and
+under several distributions that's hard or impossible to figure out.")
+    (license cc0)))
+
 
 (define-public python2-pysqlite
   (package
diff --git a/guix/licenses.scm b/guix/licenses.scm
index c3464b5..23e4458 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -25,6 +25,7 @@
             asl2.0
             boost1.0
             bsd-2 bsd-3 bsd-4 bsd-style
+            cc0
             cddl1.0
             cecill-c
             cpl1.0
@@ -108,6 +109,11 @@ which may be a file:// URI pointing the package's tree."
             "Check the URI for details.  "
             comment)))
 
+(define cc0
+  (license "CC0"
+           "http://directory.fsf.org/wiki/License:CC0"
+           "http://www.gnu.org/licenses/license-list.html#CC0"))
+
 (define cddl1.0
   (license "CDDL 1.0"
            "http://directory.fsf.org/wiki/License:CDDLv1.0"
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* RE: [PATCH 2/2] gnu: Add jrnl.
@ 2014-06-30  5:51 Eric Bavier
  2014-06-30 10:59 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bavier @ 2014-06-30  5:51 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 101 bytes --]

Please ignore the last email; it has a broken patch.  Corrected patch
attached.

Sorry for the spam.

[-- Attachment #1.2: Type: text/html, Size: 145 bytes --]

[-- Attachment #2: 0002-gnu-Add-jrnl.patch --]
[-- Type: text/x-patch, Size: 11647 bytes --]

From d2131f9ddbbac601d3915b815fa58bce05b5d663 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 30 Jun 2014 00:28:40 -0500
Subject: [PATCH 2/2] gnu: Add jrnl.

* gnu/packages/jrnl.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/python.scm (python-pycrypto, python-keyring, python-dateutil-2,
  python-parsedatetime, python-tzlocal): New variables.
* guix/licenses.scm (cc0): New variable.
---
 gnu-system.am           |    1 +
 gnu/packages/jrnl.scm   |   57 ++++++++++++++++
 gnu/packages/python.scm |  169 ++++++++++++++++++++++++++++++++++++++++++++++-
 guix/licenses.scm       |    6 ++
 4 files changed, 231 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/jrnl.scm

diff --git a/gnu-system.am b/gnu-system.am
index 3c057b3..b62d759 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -124,6 +124,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/inkscape.scm			\
   gnu/packages/irssi.scm			\
   gnu/packages/iso-codes.scm			\
+  gnu/packages/jrnl.scm				\
   gnu/packages/kde.scm				\
   gnu/packages/ld-wrapper.scm			\
   gnu/packages/less.scm				\
diff --git a/gnu/packages/jrnl.scm b/gnu/packages/jrnl.scm
new file mode 100644
index 0000000..4902647
--- /dev/null
+++ b/gnu/packages/jrnl.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages jrnl)
+  #:use-module (guix packages)
+  #:use-module (guix licenses)
+  #:use-module (guix download)
+  #:use-module (guix build-system python)
+  #:use-module (gnu packages python))
+
+(define-public jrnl
+  (package
+    (name "jrnl")
+    (version "1.8.4")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/maebert/jrnl/archive/"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "019ky09sj5i7frmca0imv4jm46mn3f4lzah2wmiwxh22cisj7ksn"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("behave" ,behave)))
+    (inputs
+     `(("python" ,python)
+       ("python-keyring" ,python-keyring)
+       ("python-pycrypto" ,python-pycrypto)
+       ("python-pytz" ,python-pytz)
+       ("python-tzlocal" ,python-tzlocal)
+       ("python-six" ,python-six)
+       ("python-dateutil" , python-dateutil-2)
+       ("python-parsedatetime" ,python-parsedatetime)))
+    (home-page "http://maebert.github.io/jrnl/")
+    (synopsis "Journal application")
+    (description
+     "Jrnl is a command line journal application that stores your journal in a
+plain text file.  Optionally, your journal can be encrypted using 256-bit AES
+encryption.")
+    (license (x11-style "file://LICENSE"))))
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3c80e8e..83575cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -22,8 +22,9 @@
 
 (define-module (gnu packages python)
   #:use-module ((guix licenses)
-                #:select (bsd-3 bsd-style expat psfl x11 x11-style
-                          gpl2 gpl2+ lgpl2.1+))
+                #:select (asl2.0 bsd-3 bsd-style cc0 expat x11 x11-style
+                          gpl2 gpl2+ lgpl2.1+
+                          psfl public-domain))
   #:use-module ((guix licenses) #:select (zlib)
                                 #:renamer (symbol-prefix-proc 'license:))
   #:use-module (gnu packages)
@@ -36,6 +37,8 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sqlite)
+  #:use-module ((gnu packages zip) #:select (unzip))
+  #:use-module (gnu packages multiprecision)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -381,6 +384,80 @@ Python 3 support.")
   (package-with-python2 python-setuptools))
 
 
+(define-public python-pycrypto
+  (package
+    (name "python-pycrypto")
+    (version "2.6.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          "pycrypto/pycrypto-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     `(("python" ,python)
+       ("gmp" ,gmp)))
+    (arguments
+     `(#:phases
+       (alist-cons-before
+        'build 'set-build-env
+        ;; pycrypto runs an autoconf configure script behind the scenes
+        (lambda _
+          (setenv "CONFIG_SHELL" (which "bash")))
+        %standard-phases)))
+    (home-page "http://www.pycrypto.org/")
+    (synopsis "Cryptographic modules for Python")
+    (description
+     "Pycrypto is a collection of both secure hash functions (such as SHA256
+and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
+etc.). The package is structured to make adding new modules easy.")
+    (license public-domain)))
+
+(define-public python-keyring
+  (package
+    (name "python-keyring")
+    (version "3.8")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/k/"
+                          "keyring/keyring-" version ".zip"))
+      (sha256
+       (base32
+        "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python-setuptools" ,python-setuptools)
+       ("python-mock" ,python-mock)))
+    (inputs
+     `(("python-pycrypto" ,python-pycrypto)))
+    (arguments
+     `(#:tests? #f                      ;TODO: tests require pytest
+       #:phases
+       (alist-replace
+        'unpack
+        (lambda _
+          (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                      "/bin/unzip"))
+                (source (assoc-ref %build-inputs "source")))
+            (and (zero? (system* unzip source))
+                 (chdir (string-append "keyring-" ,version)))))
+        %standard-phases)))
+    (home-page "http://bitbucket.org/kang/python-keyring-lib")
+    (synopsis "Store and access your passwords safely")
+    (description
+     "The Python keyring lib provides a easy way to access the system keyring
+service from python. It can be used in any application that needs safe
+password storage.")
+    ;; "MIT" and PSF dual license
+    (license x11)))
+
 (define-public python-six
   (package
     (name "python-six")
@@ -406,6 +483,33 @@ Six supports every Python version since 2.5. It is contained in only one
 Python file, so it can be easily copied into your project.")
     (license (x11-style "file://LICENSE"))))
 
+(define-public python-dateutil-2
+  (package
+    (name "python-dateutil")
+    (version "2.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          name "/" name "-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-six" ,python-six)))
+    (home-page "http://labix.org/python-dateutil")
+    (synopsis
+     "Extensions to the standard datetime module, available in Python 2.3+")
+    (description
+     "The dateutil module provides powerful extensions to the standard
+datetime module, available in Python 2.3+.")
+    (license bsd-3)))
+
+(define-public python2-dateutil-2
+  (package-with-python2 python-dateutil-2))
+
 (define-public python-dateutil
   (package
     (name "python-dateutil")
@@ -432,6 +536,67 @@ datetime module, available in Python 2.3+.")
 (define-public python2-dateutil
   (package-with-python2 python-dateutil))
 
+(define-public python-parsedatetime
+  (package
+    (name "python-parsedatetime")
+    (version "1.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/p/"
+                          "parsedatetime/parsedatetime-" version ".tar.gz"))
+      (sha256
+       (base32
+        "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (arguments `(#:tests? #f))          ;no test target
+    (home-page "http://github.com/bear/parsedatetime/")
+    (synopsis
+     "Parse human-readable date/time text")
+    (description
+     "Parse human-readable date/time text")
+    (license asl2.0)))
+
+(define-public python-tzlocal
+  (package
+    (name "python-tzlocal")
+    (version "1.1.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://pypi.python.org/packages/source/t/"
+                          "tzlocal/tzlocal-" version ".zip"))
+      (sha256
+       (base32
+        "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python-setuptools" ,python-setuptools)))
+    (inputs `(("python-pytz" ,python-pytz)))
+    (arguments
+     `(#:phases
+       (alist-replace
+        'unpack
+        (lambda _
+          (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                      "/bin/unzip"))
+                (source (assoc-ref %build-inputs "source")))
+            (and (zero? (system* unzip source))
+                 (chdir (string-append "tzlocal-" ,version)))))
+        %standard-phases)))
+    (home-page "https://github.com/regebro/tzlocal")
+    (synopsis
+     "tzinfo object for the local timezone")
+    (description
+     "Tzlocal returns a tzinfo object with the local timezone information.
+This module attempts to fix a glaring hole in pytz, that there is no way to
+get the local timezone information, unless you know the zoneinfo name, and
+under several distributions that's hard or impossible to figure out.")
+    (license cc0)))
+
 
 (define-public python2-pysqlite
   (package
diff --git a/guix/licenses.scm b/guix/licenses.scm
index c3464b5..23e4458 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -25,6 +25,7 @@
             asl2.0
             boost1.0
             bsd-2 bsd-3 bsd-4 bsd-style
+            cc0
             cddl1.0
             cecill-c
             cpl1.0
@@ -108,6 +109,11 @@ which may be a file:// URI pointing the package's tree."
             "Check the URI for details.  "
             comment)))
 
+(define cc0
+  (license "CC0"
+           "http://directory.fsf.org/wiki/License:CC0"
+           "http://www.gnu.org/licenses/license-list.html#CC0"))
+
 (define cddl1.0
   (license "CDDL 1.0"
            "http://directory.fsf.org/wiki/License:CDDLv1.0"
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-30 10:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30  5:44 [PATCH 2/2] gnu: Add jrnl Eric Bavier
  -- strict thread matches above, loose matches on Subject: below --
2014-06-30  5:51 Eric Bavier
2014-06-30 10:59 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.