Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
Matthew Bauer
2018-05-08 09:36:00 -05:00
317 changed files with 7440 additions and 6298 deletions

View File

@@ -0,0 +1,19 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, aiohttp }:
buildPythonPackage rec {
pname = "aiohue";
version = "1.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "05b2fj8pzbij8hglx6p5ckfx0h1b7wcfpys306l853vp56d882yh";
};
propagatedBuildInputs = [ aiohttp ];
meta = with lib; {
description = "asyncio package to talk to Philips Hue";
homepage = https://github.com/balloob/aiohue;
license = licenses.asl20;
};
}

View File

@@ -0,0 +1,19 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, requests-cache }:
buildPythonPackage rec {
pname = "coinmarketcap";
version = "4.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "0bk530cmfqri84m9386ydn3f89gq23nxylvnl523gr5589vw54bj";
};
propagatedBuildInputs = [ requests-cache ];
meta = with lib; {
description = "A python wrapper around the https://coinmarketcap.com API.";
homepage = https://github.com/barnumbirr/coinmarketcap;
license = licenses.asl20;
};
}

View File

@@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "neovim";
version = "0.2.4";
version = "0.2.6";
src = fetchPypi {
inherit pname version;
sha256 = "0accfgyvihs08bwapgakx6w93p4vbrq2448n2z6gw88m2hja9jm3";
sha256 = "0xlj54w9bnmq4vidk6r08hwa6az7drahi08w1qf4j9q45rs8mrbc";
};
checkInputs = [ nose ];

View File

@@ -2,12 +2,12 @@
buildPythonPackage rec {
pname = "phonenumbers";
version = "8.9.3";
version = "8.9.5";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "68f7402c6d2646adff4df895471f2b47fd61d0cf57c59a06aacc88dfff04a1cb";
sha256 = "09swdf3f9sdvqyyzkap93012m9fnhamizf42d5kzpdjwikvsfx8x";
};
meta = {

View File

@@ -0,0 +1,19 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, requests }:
buildPythonPackage rec {
pname = "PyMVGLive";
version = "1.1.4";
src = fetchPypi {
inherit pname version;
sha256 = "0sh4xm74im9qxzpbrlc5h1vnpgvpybnpvdcav1iws0b561zdr08c";
};
propagatedBuildInputs = [ requests ];
meta = with lib; {
description = "get live-data from mvg-live.de";
homepage = https://github.com/pc-coholic/PyMVGLive;
license = licenses.free;
};
}

View File

@@ -0,0 +1,19 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, requests }:
buildPythonPackage rec {
pname = "pyowm";
version = "2.8.0";
src = fetchPypi {
inherit pname version;
sha256 = "0y2r322pcamabar70513pbyiq26x33l1aq9cim6k30lk9p4aq310";
};
propagatedBuildInputs = [ requests ];
meta = with lib; {
description = "A Python wrapper around the OpenWeatherMap web API";
homepage = https://pyowm.readthedocs.io/;
license = licenses.mit;
};
}

View File

@@ -1,8 +1,31 @@
{ buildPythonPackage, fetchFromGitHub, lib, numpy, pyyaml, cffi, cmake,
git, stdenv }:
{ buildPythonPackage,
cudaSupport ? false, cudatoolkit ? null, cudnn ? null,
fetchFromGitHub, fetchpatch, lib, numpy, pyyaml, cffi, cmake,
git, stdenv, linkFarm, symlinkJoin,
utillinux, which }:
buildPythonPackage rec {
version = "0.2.0";
assert cudnn == null || cudatoolkit != null;
assert !cudaSupport || cudatoolkit != null;
let
cudatoolkit_joined = symlinkJoin {
name = "${cudatoolkit.name}-unsplit";
paths = [ cudatoolkit.out cudatoolkit.lib ];
};
# Normally libcuda.so.1 is provided at runtime by nvidia-x11 via
# LD_LIBRARY_PATH=/run/opengl-driver/lib. We only use the stub
# libcuda.so from cudatoolkit for running tests, so that we dont have
# to recompile pytorch on every update to nvidia-x11 or the kernel.
cudaStub = linkFarm "cuda-stub" [{
name = "libcuda.so.1";
path = "${cudatoolkit}/lib/stubs/libcuda.so";
}];
cudaStubEnv = lib.optionalString cudaSupport
"LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ";
in buildPythonPackage rec {
version = "0.3.1";
pname = "pytorch";
name = "${pname}-${version}";
@@ -10,18 +33,41 @@ buildPythonPackage rec {
owner = "pytorch";
repo = "pytorch";
rev = "v${version}";
sha256 = "1s3f46ga1f4lfrcj3lpvvhgkdr1pi8i2hjd9xj9qiz3a9vh2sj4n";
fetchSubmodules = true;
sha256 = "1k8fr97v5pf7rni5cr2pi21ixc3pdj3h3lkz28njbjbgkndh7mr3";
};
checkPhase = ''
${stdenv.shell} test/run_test.sh
patches = [
(fetchpatch {
# make sure stdatomic.h is included when checking for ATOMIC_INT_LOCK_FREE
# Fixes this test failure:
# RuntimeError: refcounted file mapping not supported on your system at /tmp/nix-build-python3.6-pytorch-0.3.0.drv-0/source/torch/lib/TH/THAllocator.c:525
url = "https://github.com/pytorch/pytorch/commit/502aaf39cf4a878f9e4f849e5f409573aa598aa9.patch";
stripLen = 3;
extraPrefix = "torch/lib/";
sha256 = "1miz4lhy3razjwcmhxqa4xmlcmhm65lqyin1czqczj8g16d3f62f";
})
];
postPatch = ''
substituteInPlace test/run_test.sh --replace \
"INIT_METHOD='file://'\$TEMP_DIR'/shared_init_file' \$PYCMD ./test_distributed.py" \
"echo Skipped for Nix package"
'';
preConfigure = lib.optionalString cudaSupport ''
export CC=${cudatoolkit.cc}/bin/gcc
'' + lib.optionalString (cudaSupport && cudnn != null) ''
export CUDNN_INCLUDE_DIR=${cudnn}/include
'';
buildInputs = [
cmake
git
numpy.blas
];
utillinux
which
] ++ lib.optionals cudaSupport [cudatoolkit_joined cudnn];
propagatedBuildInputs = [
cffi
@@ -29,8 +75,8 @@ buildPythonPackage rec {
pyyaml
];
preConfigure = ''
export NO_CUDA=1
checkPhase = ''
${cudaStubEnv}${stdenv.shell} test/run_test.sh
'';
meta = {

View File

@@ -1,4 +1,4 @@
{ buildPythonPackage, fetchurl, glibcLocales, mock, pytest, botocore,
{ stdenv, buildPythonPackage, fetchurl, glibcLocales, mock, pytest, botocore,
testfixtures, pillow, six, twisted, w3lib, lxml, queuelib, pyopenssl,
service-identity, parsel, pydispatcher, cssselect, lib }:
buildPythonPackage rec {
@@ -20,8 +20,9 @@ buildPythonPackage rec {
LC_ALL="en_US.UTF-8";
checkPhase = ''
py.test --ignore=tests/test_linkextractors_deprecated.py --ignore=tests/test_proxy_connect.py
py.test --ignore=tests/test_linkextractors_deprecated.py --ignore=tests/test_proxy_connect.py ${lib.optionalString stdenv.isDarwin "--ignore=tests/test_utils_iterators.py"}
# The ignored tests require mitmproxy, which depends on protobuf, but it's disabled on Python3
# Ignore iteration test, because lxml can't find encodings on darwin https://bugs.launchpad.net/lxml/+bug/707396
'';
src = fetchurl {
@@ -34,6 +35,6 @@ buildPythonPackage rec {
homepage = http://scrapy.org/;
license = licenses.bsd3;
maintainers = with maintainers; [ drewkett ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@@ -4,17 +4,16 @@
, supervise
, isPy3k
, whichcraft
, utillinux
}:
buildPythonPackage rec {
pname = "supervise_api";
version = "0.4.0";
name = "${pname}-${version}";
version = "0.5.3";
src = fetchPypi {
inherit pname version;
sha256 = "029h1mlfhkm9lw043rawh24ld8md620y94k6c1l9hs5vvyq4fs84";
sha256 = "0dakc1h2ih1bw67y137wp0vph8d3y2lx5d70b8dgggy1zbpqxl1m";
};
propagatedBuildInputs = [
@@ -22,9 +21,7 @@ buildPythonPackage rec {
] ++ lib.optionals ( !isPy3k ) [
whichcraft
];
# no tests
doCheck = false;
checkInputs = [ utillinux ];
meta = {
description = "An API for running processes safely and securely";

View File

@@ -1,13 +1,13 @@
diff --git a/setup.py b/setup.py
index 053ed07..60f0d9a 100755
index 991e89c..7a96ccf 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import yowsup
import platform
import sys
-deps = ['python-dateutil', 'argparse', 'python-axolotl>=0.1.39', 'six']
-deps = ['python-dateutil', 'argparse', 'python-axolotl>=0.1.39', 'six==1.10']
+deps = ['python-dateutil', 'python-axolotl>=0.1.39', 'six']
if sys.version_info < (2,7):
deps += ['importlib']
deps += ['importlib', "protobuf==3.4.0"]

View File

@@ -3,19 +3,18 @@
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "yowsup";
version = "2.5.2";
version = "2.5.7";
# python2 is currently incompatible with yowsup:
# https://github.com/tgalal/yowsup/issues/2325#issuecomment-343516519
# The Python 2.x support of this package is incompatible with `six==1.11`:
# https://github.com/tgalal/yowsup/issues/2416#issuecomment-365113486
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "tgalal";
repo = "yowsup";
rev = "v${version}";
sha256 = "16l8jmr32wwvl11m0a4r4id3dkfqj2n7dn6gky1077xwmj2da4fl";
sha256 = "1p0hdj5x38v2cxjnhdnqcnp5g7la57mbi365m0z83wa01x2n73w6";
};
checkInputs = [ pytest ];