From dfcbb87cbc3f624802ac8f294afbc6e7c6771783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 28 Jun 2009 13:19:44 +0000 Subject: [PATCH] Python: Fix `pyutil'; add `argparse' and `zfec'. svn path=/nixpkgs/trunk/; revision=16075 --- pkgs/top-level/python-packages.nix | 63 +++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 48b5ce71e32c..5428fe755c97 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -76,7 +76,8 @@ rec { sha256 = "1ksb4gn8x53wcyddmjv1ma8cvvhjlmfxc6kpszyhb838i7xzla19"; }; - buildInputs = [ setuptoolsDarcs zbase32 ]; + buildInputs = [ setuptoolsDarcs ]; + propagatedBuildInputs = [ zbase32 argparse ]; meta = { description = "Pyutil, a collection of mature utilities for Python programmers"; @@ -188,4 +189,64 @@ rec { }; }); + argparse = buildPythonPackage (rec { + name = "argparse-0.9.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/a/argparse/${name}.zip"; + sha256 = "00jw32wwccpf9smraywjk869b93w7f99rw8gi63yfhw6379fnq6m"; + }; + + buildInputs = [ pkgs.unzip ]; + + # How do we run the tests? + doCheck = false; + + meta = { + homepage = http://code.google.com/p/argparse/; + + license = "Apache License 2.0"; + + description = "argparse: Python command line parser"; + + longDescription = '' + The argparse module makes writing command line tools in Python + easy. Just briefly describe your command line interface and + argparse will take care of the rest, including: parsing the + arguments and flags from sys.argv, converting arg strings into + objects for your program, formatting and printing any help + messages, and much more. + ''; + }; + }); + + zfec = buildPythonPackage (rec { + name = "zfec-1.4.4"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/z/zfec/${name}.tar.gz"; + sha256 = "0rgg7nsvbr4f9xmiclzypc39fnivg23kldv5aa8si0bgsxn6mh6w"; + }; + + buildInputs = [ setuptoolsDarcs ]; + propagatedBuildInputs = [ pyutil argparse ]; + + meta = { + homepage = http://allmydata.org/trac/zfec; + + description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell"; + + longDescription = '' + Fast, portable, programmable erasure coding a.k.a. "forward + error correction": the generation of redundant blocks of + information such that if some blocks are lost then the + original data can be recovered from the remaining blocks. The + zfec package includes command-line tools, C API, Python API, + and Haskell API. + ''; + + license = "GPLv2+"; + }; + }); + }