Merge pull request #27497 from wizzup/cleanup-pythonPackages

Cleanup pkgs/top-level/python-packages.nix
This commit is contained in:
Jörg Thalheim
2017-07-19 13:16:41 +01:00
committed by GitHub
11 changed files with 274 additions and 223 deletions

View File

@@ -0,0 +1,39 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, python, openssl }:
buildPythonPackage rec {
pname = "acme-tiny";
version = "2016-03-26";
name = "${pname}-${version}";
src = fetchFromGitHub {
sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g";
rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971";
repo = "acme-tiny";
owner = "diafygi";
};
# source doesn't have any python "packaging" as such
configurePhase = " ";
buildPhase = " ";
# the tests are... complex
doCheck = false;
patchPhase = ''
substituteInPlace acme_tiny.py --replace "openssl" "${openssl.bin}/bin/openssl"
'';
installPhase = ''
mkdir -p $out/${python.sitePackages}/
cp acme_tiny.py $out/${python.sitePackages}/
mkdir -p $out/bin
ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny
chmod +x $out/bin/acme_tiny
'';
meta = with stdenv.lib; {
description = "A tiny script to issue and renew TLS certs from Let's Encrypt";
homepage = https://github.com/diafygi/acme-tiny;
license = licenses.mit;
};
}

View File

@@ -0,0 +1,29 @@
{ stdenv, buildPythonPackage, fetchPypi
, pep8, nose, unittest2, docutils, blockdiag }:
buildPythonPackage rec {
pname = "actdiag";
version = "0.5.3";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1vr4hnkr0gcvvpaycd8q3vcx029b2f5yv8swhdr8kwspaqb0dvfa";
};
buildInputs = [ pep8 nose unittest2 docutils ];
propagatedBuildInputs = [ blockdiag ];
# One test fails:
# UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 0: ordinal not in range(128)
doCheck = false;
meta = with stdenv.lib; {
description = "Generate activity-diagram image from spec-text file (similar to Graphviz)";
homepage = http://blockdiag.com/;
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ bjornfor ];
};
}

View File

@@ -0,0 +1,22 @@
{ stdenv, buildPythonPackage, fetchPypi
, requests, pyjwt }:
buildPythonPackage rec {
pname = "adal";
version = "0.1.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1f32k18ck54adqlgvh6fjhy4yavcyrwy813prjyqppqqq4bn1a09";
};
propagatedBuildInputs = [ requests pyjwt ];
meta = with stdenv.lib; {
description = "Library to make it easy for python application to authenticate to Azure Active Directory (AAD) in order to access AAD protected web resources";
homepage = https://github.com/AzureAD/azure-activedirectory-library-for-python;
license = licenses.mit;
maintainers = with maintainers; [ phreedom ];
};
}

View File

@@ -0,0 +1,39 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, isPy3k , dbacl, notmuch, chardet, subprocess32 }:
buildPythonPackage rec {
pname = "afew";
version = "git-2017-02-08";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "afewmail";
repo = "afew";
rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67";
sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm";
};
buildInputs = [ dbacl ];
propagatedBuildInputs = [
notmuch
chardet
] ++ stdenv.lib.optional (!isPy3k) subprocess32;
doCheck = false;
preConfigure = ''
substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${dbacl}/bin/dbacl'"
'';
postInstall = ''
wrapProgram $out/bin/afew \
--prefix LD_LIBRARY_PATH : ${notmuch}/lib
'';
meta = with stdenv.lib; {
homepage = https://github.com/teythoon/afew;
description = "An initial tagging script for notmuch mail";
maintainers = with maintainers; [ garbas ];
};
}

View File

@@ -0,0 +1,30 @@
{ stdenv, buildPythonPackage, fetchPypi
, isPy33, isPy26, isPy27, isPyPy, python, pycares, asyncio, trollius }:
buildPythonPackage rec {
pname = "aiodns";
version = "1.0.1";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "595b78b8d54115d937cf60d778c02dad76b6f789fd527dab308f99e5601e7f3d";
};
propagatedBuildInputs = with stdenv.lib; [ pycares ]
++ optional isPy33 asyncio
++ optional (isPy26 || isPy27 || isPyPy) trollius;
checkPhase = ''
${python.interpreter} tests.py
'';
# 'Could not contact DNS servers'
doCheck = false;
meta = with stdenv.lib; {
homepage = http://github.com/saghul/aiodns;
license = licenses.mit;
description = "Simple DNS resolver for asyncio";
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi
, pygments }:
buildPythonPackage rec {
pname = "alabaster";
version = "0.7.7";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "f416a84e0d0ddbc288f6b8f2c276d10b40ca1238562cd9ed5a751292ec647b71";
};
propagatedBuildInputs = [ pygments ];
# No tests included
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/bitprophet/alabaster;
description = "A Sphinx theme";
license = licenses.bsd3;
};
}

View File

@@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi
, dateutil }:
buildPythonPackage rec {
pname = "aniso8601";
version = "1.2.0";
name = "${pname}-${version}";
meta = with stdenv.lib; {
description = "Parses ISO 8601 strings.";
homepage = "https://bitbucket.org/nielsenb/aniso8601";
license = licenses.bsd3;
};
propagatedBuildInputs = [ dateutil ];
src = fetchPypi {
inherit pname version;
sha256 = "502400f82574afa804cc915d83f15c67533d364dcd594f8a6b9d2053f3404dd4";
};
}

View File

@@ -0,0 +1,19 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "ansicolors";
version = "1.0.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "02lmh2fbqcwr98cq13l9ql0fvyad1dcb3ap3c5xq9qwjp45m6r3n";
};
meta = with stdenv.lib; {
homepage = "https://github.com/verigak/colors/";
description = "ANSI colors for Python";
license = licenses.isc;
maintainers = with maintainers; [ copumpkin ];
};
}

View File

@@ -0,0 +1,17 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
version = "0.4";
pname = "python-editor";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1gykxn16anmsbcrwhx3rrhwjif95mmwvq9gjcrr9bbzkdc8sf8a4";
};
meta = with stdenv.lib; {
description = "A library that provides the `editor` module for programmatically";
homepage = "https://github.com/fmoo/python-editor";
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi
, udev }:
buildPythonPackage rec {
pname = "python-uinput";
version = "0.11.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "033zqiypjz0nigav6vz0s57pbzikvds55mxphrdpkdbpdikjnfcr";
};
buildInputs = [ udev ];
NIX_CFLAGS_LINK = [ "-ludev" ];
meta = with stdenv.lib; {
description = "Pythonic API to Linux uinput kernel module";
homepage = "http://tjjr.fi/sw/python-uinput/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ abbradar ];
};
}