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

This commit is contained in:
Tuomas Tynkkynen
2018-05-22 17:48:29 +03:00
47 changed files with 1103 additions and 581 deletions

View File

@@ -0,0 +1,30 @@
{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, requests
, requests-mock, pytest
}:
buildPythonPackage rec {
pname = "pyairvisual";
version = "1.0.0";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = "v${version}";
sha256 = "0ng6k07n91k5l68zk3hl4fywb33admp84wqdm20qmmw9yc9c64fd";
};
checkInputs = [ pytest requests-mock ];
propagatedBuildInputs = [ requests ];
checkPhase = ''
py.test tests
'';
disabled = !isPy3k;
meta = with lib; {
description = "A thin Python wrapper for the AirVisual API";
license = licenses.mit;
homepage = https://github.com/bachya/pyairvisual;
};
}

View File

@@ -1,19 +1,17 @@
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub }:
{ stdenv, buildPythonPackage, isPy3k, fetchPypi }:
buildPythonPackage rec {
pname = "pyhomematic";
version = "0.1.42";
version = "0.1.43";
disabled = !isPy3k;
# PyPI tarball does not include tests/ directory
src = fetchFromGitHub {
owner = "danielperna84";
repo = pname;
rev = version;
sha256 = "0h7bq66q22kzj1xwhxmr7knibsmb4csjwq3jr19fyl9sxxmgqwqy";
src = fetchPypi {
inherit pname version;
sha256 = "0b6f4f5c8ddca15e0a1df367bafdffb2f08f1e42f17c78b9470573287e5b20bc";
};
# PyPI tarball does not include tests/ directory
# Unreliable timing: https://github.com/danielperna84/pyhomematic/issues/126
doCheck = false;

View File

@@ -0,0 +1,39 @@
{ stdenv, lib, fetchPypi, buildPythonPackage, fetchurl, libvorbis, flac, libogg, libopus, opusfile }:
buildPythonPackage rec {
pname = "PyOgg";
version = "0.6.2a1";
src = fetchPypi {
inherit pname version;
sha256 = "1mjh5zx7mfy246lya1qc42j4q4pz6v5zbd8blnfib9ncswcb1v6l";
};
buildInputs = [ libvorbis flac libogg libopus ];
propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ];
# There are no tests in this package.
doCheck = false;
postPatch = ''
substituteInPlace pyogg/vorbis.py --replace \
'libvorbisfile = ExternalLibrary.load("vorbisfile")' "libvorbisfile = ctypes.CDLL('${libvorbis}/lib/libvorbisfile${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/vorbis.py --replace \
'libvorbisenc = ExternalLibrary.load("vorbisenc")' "libvorbisenc = ctypes.CDLL('${libvorbis}/lib/libvorbisenc${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/vorbis.py --replace \
'libvorbis = ExternalLibrary.load("vorbis")' "libvorbis = ctypes.CDLL('${libvorbis}/lib/libvorbis${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/flac.py --replace \
'libflac = ExternalLibrary.load("flac")' "libflac = ctypes.CDLL('${flac.out}/lib/libFLAC${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/ogg.py --replace \
'libogg = ExternalLibrary.load("ogg")' "libogg = ctypes.CDLL('${libogg}/lib/libogg${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/opus.py --replace \
'libopus = ExternalLibrary.load("opus")' "libopus = ctypes.CDLL('${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}')"
substituteInPlace pyogg/opus.py --replace \
'libopusfile = ExternalLibrary.load("opusfile")' "libopusfile = ctypes.CDLL('${opusfile}/lib/libopusfile${stdenv.hostPlatform.extensions.sharedLibrary}')"
'';
meta = {
description = "Xiph.org's Ogg Vorbis, Opus and FLAC for Python";
homepage = https://github.com/Zuzu-Typ/PyOgg;
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ pmiddend ];
};
}

View File

@@ -0,0 +1,16 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "timeout-decorator";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "1bckwbi5078z3x9lyf8vl9dhx10nymwwnp46c98wm5m02x5j37g4";
};
meta = with stdenv.lib; {
description = "Timeout decorator";
license = licenses.mit;
homepage = https://github.com/pnpnpn/timeout-decorator;
};
}