Merge pull request #108378 from SuperSandro2000/random-fixes

This commit is contained in:
Sandro 2021-01-07 11:07:10 +01:00 committed by GitHub
commit 1b4fb94f58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 568 additions and 197 deletions

View File

@ -1,5 +1,4 @@
{ lib, python3Packages, gobject-introspection, gtk3, pango, wrapGAppsHook
, chromecastSupport ? false
, serverSupport ? false
, keyringSupport ? true
@ -51,6 +50,10 @@ python3Packages.buildPythonApplication rec {
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
# no tests
doCheck = false;
pythonImportsCheck = [ "sublime" ];
meta = with lib; {
description = "GTK3 Subsonic/Airsonic client";
homepage = "https://sublimemusic.app/";

View File

@ -19,40 +19,41 @@ stdenv.mkDerivation rec {
python3Packages.python
];
pythonPath = [
python3Packages.libtorrent-rasterbar
python3Packages.twisted
python3Packages.netifaces
python3Packages.pycrypto
python3Packages.pyasn1
python3Packages.requests
python3Packages.m2crypto
python3Packages.pyqt5
python3Packages.chardet
python3Packages.cherrypy
python3Packages.cryptography
python3Packages.libnacl
python3Packages.configobj
python3Packages.decorator
python3Packages.feedparser
python3Packages.service-identity
python3Packages.psutil
python3Packages.pillow
python3Packages.networkx
python3Packages.pony
python3Packages.lz4
python3Packages.pyqtgraph
pythonPath = with python3Packages; [
libtorrent-rasterbar
twisted
netifaces
pycrypto
pyasn1
requests
m2crypto
pyqt5
chardet
cherrypy
cryptography
libnacl
configobj
decorator
feedparser
service-identity
psutil
pillow
networkx
pony
lz4
pyqtgraph
# there is a BTC feature, but it requires some unclear version of
# bitcoinlib, so this doesn't work right now.
# python3Packages.bitcoinlib
# bitcoinlib
];
postPatch = ''
${stdenv.lib.optionalString enablePlayer ''
substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${libvlc}/lib/libvlc.so')"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "if vlc and vlc.plugin_path" "if vlc"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${libvlc}/lib/vlc/plugins'"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" \
--replace "if vlc and vlc.plugin_path" "if vlc" \
--replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${libvlc}/lib/vlc/plugins'"
''}
'';

View File

@ -45,6 +45,8 @@ in buildPythonPackage rec {
cp ${buildWorker "${src}/worker"}/bin/worker $out/bin/builds.sr.ht-worker
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/builds.sr.ht";
description = "Continuous integration service for the sr.ht network";

View File

@ -24,6 +24,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://dispatch.sr.ht/~sircmpwn/dispatch.sr.ht";
description = "Task dispatcher and service integration tool for the sr.ht network";

View File

@ -67,6 +67,8 @@ in buildPythonPackage rec {
cp ${buildAPI "${src}/api"}/bin/api $out/bin/gitsrht-api
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/git.sr.ht";
description = "Git repository hosting service for the sr.ht network";

View File

@ -25,6 +25,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/hg.sr.ht";
description = "Mercurial repository hosting service for the sr.ht network";

View File

@ -22,6 +22,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/hub.sr.ht";
description = "Project hub service for the sr.ht network";

View File

@ -26,6 +26,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/lists.sr.ht";
description = "Mailing list service for the sr.ht network";

View File

@ -23,6 +23,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/man.sr.ht";
description = "Wiki service for the sr.ht network";

View File

@ -48,6 +48,8 @@ in buildPythonPackage rec {
cp ${buildAPI "${src}/api"}/bin/api $out/bin/metasrht-api
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
description = "Account management service for the sr.ht network";

View File

@ -23,6 +23,8 @@ buildPythonPackage rec {
export PKGVER=${version}
'';
dontUseSetuptoolsCheck = true;
meta = with stdenv.lib; {
homepage = "https://git.sr.ht/~sircmpwn/paste.sr.ht";
description = "Ad-hoc text file hosting service for the sr.ht network";

View File

@ -1,4 +1,4 @@
{ lib, python3Packages, gtk3, gobject-introspection, ffmpeg_3, wrapGAppsHook }:
{ stdenv, lib, python3Packages, gtk3, gobject-introspection, ffmpeg_3, wrapGAppsHook }:
with python3Packages;
buildPythonApplication rec {
@ -24,5 +24,6 @@ buildPythonApplication rec {
description = "A native Linux GUI for Chromecasting local files";
homepage = "https://github.com/keredson/gnomecast";
license = with licenses; [ gpl3 ];
broken = stdenv.isDarwin;
};
}

View File

@ -53,6 +53,10 @@ buildPythonApplication rec {
pywebview
];
# no tests
doCheck = false;
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
meta = with stdenv.lib; {
homepage = "https://github.com/iwalton3/jellyfin-mpv-shim";
description = "Allows casting of videos to MPV via the jellyfin mobile and web app";

View File

@ -29,6 +29,7 @@ mkDerivation rec {
homepage = "https://gitlab.com/mpc-qt/mpc-qt";
license = licenses.gpl2;
platforms = platforms.unix;
broken = stdenv.isDarwin;
maintainers = with maintainers; [ romildo ];
};
}

View File

@ -13,6 +13,9 @@ buildPythonApplication rec {
propagatedBuildInputs = [ mpv requests python-mpv-jsonipc ];
# does not contain tests
doCheck = false;
meta = with stdenv.lib; {
homepage = "https://github.com/iwalton3/plex-mpv-shim";
description = "Allows casting of videos to MPV via the Plex mobile and web app";

View File

@ -1,32 +1,31 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, aiounittest
, buildPythonPackage
, fetchPypi
, isPy27
, pytest
, pytestCheckHook
, typing-extensions
}:
buildPythonPackage rec {
pname = "aiosqlite";
version = "0.12.0";
version = "0.16.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = "jreese";
repo = pname;
rev = "v${version}";
sha256 = "090vdv210zfry0bms5b3lmm06yhiyjb8ga96996cqs611l7c2a2j";
src = fetchPypi {
inherit pname version;
sha256 = "1a0fjmlvadyzsml10g5p1qif7192k0swy5zwjp8v48y5zc3yy56h";
};
buildInputs = [
setuptools
];
checkInputs = [
aiounittest
pytestCheckHook
typing-extensions
];
# tests are not pick-up automatically by the hook
pytestFlagsArray = [ "aiosqlite/tests/*.py" ];
meta = with lib; {
description = "Asyncio bridge to the standard sqlite3 module";
homepage = "https://github.com/jreese/aiosqlite";

View File

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "backports-datetime-fromisoformat";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "0p0gyhfqq6gssf3prsy0pcfq5w0wx2w3pcjqbwx3imvc92ls4xwm";
};
# no tests in pypi package
doCheck = false;
pythonImportsCheck = [ "backports.datetime_fromisoformat" ];
meta = with lib; {
description = "Backport of Python 3.7's datetime.fromisoformat";
homepage = "https://github.com/movermeyer/backports.datetime_fromisoformat";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -0,0 +1,24 @@
{ lib, buildPythonPackage, fetchPypi, base58, ecdsa, hidapi, noiseprotocol, protobuf, semver, typing-extensions }:
buildPythonPackage rec {
pname = "bitbox02";
version = "5.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "0hnjjjarr4q22wh03zyyqfhsizzsvg46030kks3qkzbsv29vqqh5";
};
propagatedBuildInputs = [ base58 ecdsa hidapi noiseprotocol protobuf semver typing-extensions ];
# does not contain tests
doCheck = false;
pythonImportsCheck = [ "bitbox02" ];
meta = with lib; {
description = "Firmware code of the BitBox02 hardware wallet";
homepage = "https://github.com/digitalbitbox/bitbox02-firmware/";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -45,6 +45,8 @@ buildPythonPackage rec {
"--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"}
'';
__darwinAllowLocalNetworking = true;
meta = with stdenv.lib; {
homepage = "https://www.cherrypy.org";
description = "A pythonic, object-oriented HTTP framework";

View File

@ -10,6 +10,9 @@ buildPythonPackage rec {
sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii";
};
doCheck = false;
pythonImportsCheck = [ "demjson" ];
meta = with stdenv.lib; {
description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)";
homepage = "https://github.com/dmeranda/demjson";

View File

@ -1,61 +1,58 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, uvicorn
, starlette
, pydantic
, isPy3k
, pytest
, pytestcov
, pyjwt
, passlib
, starlette
, pytestCheckHook
, pytest-asyncio
, aiosqlite
, peewee
, databases
, flask
, httpx
, passlib
, peewee
, python-jose
, sqlalchemy
}:
buildPythonPackage rec {
pname = "fastapi";
version = "0.55.1";
version = "0.63.0";
format = "flit";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "tiangolo";
repo = "fastapi";
rev = version;
sha256 = "1515nhwari48v0angyl5z3cfpvwn4al2nvqh0cjd9xgxzvm310s8";
sha256 = "0l3imrcs42pqf9d6k8c1q15k5sqcnapl5zk71xl52mrxhz49lgpi";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "starlette ==0.13.2" "starlette"
--replace "starlette ==0.13.6" "starlette"
'';
propagatedBuildInputs = [
uvicorn
starlette
pydantic
];
checkInputs = [
pytest
pytestcov
pyjwt
passlib
aiosqlite
peewee
databases
flask
httpx
passlib
peewee
python-jose
pytestCheckHook
pytest-asyncio
sqlalchemy
];
# test_default_response_class.py: requires orjson, which requires rust toolchain
# test_custom_response/test_tutorial001b.py: requires orjson
# tests/test_tutorial/test_sql_databases/test_testing_databases.py: just broken, don't know why
checkPhase = ''
pytest --ignore=tests/test_default_response_class.py \
--ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \
--ignore=tests/test_tutorial/test_sql_databases/test_testing_databases.py
'';
# disabled tests require orjson which requires rust nightly
pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ];
disabledTests = [ "test_get_custom_response" ];
meta = with lib; {
homepage = "https://github.com/tiangolo/fastapi";

View File

@ -0,0 +1,30 @@
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytest-benchmark, wasmer }:
buildPythonPackage rec {
pname = "fastdiff";
version = "0.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "1ai95vjchl4396zjl1b69xfqvn9kn1y7c40d9l0qxdss0pcx6fk2";
};
postPatch = ''
substituteInPlace setup.py \
--replace 'pytest-runner' ""
'';
propagatedBuildInputs = [ wasmer ];
checkInputs = [ pytestCheckHook pytest-benchmark ];
pythonImportsCheck = [ "fastdiff" ];
disabledTests = [ "test_native" ];
meta = with lib; {
description = "A fast native implementation of diff algorithm with a pure Python fallback";
homepage = "https://github.com/syrusakbary/fastdiff";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, aniso8601
, iso8601
, graphql-core
, graphql-relay
, pytestCheckHook
, pytest-asyncio
, pytest-benchmark
, pytest-mock
, pytz
, snapshottest
}:
buildPythonPackage rec {
pname = "graphene";
version = "3.0.0b6";
src = fetchFromGitHub {
owner = "graphql-python";
repo = "graphene";
rev = "v${version}";
sha256 = "1q6qmyc4jbi9cws4d98x7bgi7gppd09dmzijkb19fwbh4giy938r";
};
propagatedBuildInputs = [
aniso8601
graphql-core
graphql-relay
];
checkInputs = [
pytestCheckHook
pytest-asyncio
pytest-benchmark
pytest-mock
pytz
snapshottest
];
pythonImportsCheck = [ "graphene" ];
meta = with lib; {
description = "GraphQL Framework for Python";
homepage = "https://github.com/graphql-python/graphene";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -0,0 +1,24 @@
{ lib, buildPythonPackage, fetchPypi, graphql-core, pytestCheckHook }:
buildPythonPackage rec {
pname = "graphql-relay";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "0mjmpf4abrxfyln0ykxq4xa6lp7xwgqr8631qp011hv0nfl6jgxd";
};
propagatedBuildInputs = [ graphql-core ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "graphql_relay" ];
meta = with lib; {
description = "A library to help construct a graphql-py server supporting react-relay";
homepage = "https://github.com/graphql-python/graphql-relay-py/";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -56,6 +56,8 @@ buildPythonPackage rec {
"test_sync_proxy_close"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";

View File

@ -1,46 +1,47 @@
{ lib
, buildPythonPackage
, fetchPypi
, mnemonic
, fetchFromGitHub
, bitbox02
, ecdsa
, typing-extensions
, hidapi
, libusb1
, mnemonic
, pyaes
, trezor
, btchip
, ckcc-protocol
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "hwi";
version = "1.2.1";
disabled = pythonAtLeast "3.9";
src = fetchPypi {
inherit pname version;
sha256 = "d0d220a4967d7f106b828b12a98b78c220d609d7cc6c811898e24fcf1a6f04f3";
src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "HWI";
rev = version;
sha256 = "0fs3152lw7y5l9ssr5as8gd739m9lb7wxpv1vc5m77k5nw7l8ax5";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'ecdsa>=0.13.0,<0.14.0'" "'ecdsa'" \
--replace "'hidapi>=0.7.99,<0.8.0'" "'hidapi'" \
--replace "'mnemonic>=0.18.0,<0.19.0'" "'mnemonic'"
'';
propagatedBuildInputs = [
mnemonic
bitbox02
ecdsa
typing-extensions
hidapi
libusb1
mnemonic
pyaes
trezor
btchip
ckcc-protocol
];
patches = [ ./relax-deps.patch ];
# tests are not packaged in the released tarball
# tests require to clone quite a few firmwares
doCheck = false;
pythonImportsCheck = [
"hwilib"
];
pythonImportsCheck = [ "hwilib" ];
meta = {
description = "Bitcoin Hardware Wallet Interface";

View File

@ -1,16 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -98,10 +98,10 @@ package_data = \
modules = \
['hwi', 'hwi-qt']
install_requires = \
-['ecdsa>=0.13.0,<0.14.0',
- 'hidapi>=0.7.99,<0.8.0',
+['ecdsa',
+ 'hidapi',
'libusb1>=1.7,<2.0',
+ 'mnemonic',
- 'mnemonic>=0.18.0,<0.19.0',
'pyaes>=1.6,<2.0',
'typing-extensions>=3.7,<4.0']

View File

@ -20,6 +20,9 @@ buildPythonPackage rec {
keepkey libagent setuptools wheel
];
doCheck = false;
pythonImportsChecks = [ "keepkey_agent" ];
meta = with stdenv.lib; {
description = "Using KeepKey as hardware-based SSH/PGP agent";
homepage = "https://github.com/romanz/trezor-agent";

View File

@ -9,6 +9,7 @@
, ndjson
, backoff
, google-api-core
, backports-datetime-fromisoformat
}:
buildPythonPackage rec {
@ -22,12 +23,11 @@ buildPythonPackage rec {
propagatedBuildInputs = [
jinja2 requests pillow rasterio shapely ndjson backoff
google-api-core
google-api-core backports-datetime-fromisoformat
];
# Test cases are not running on pypi or GitHub
doCheck = false;
pythonImportsCheck = [ "labelbox" ];
meta = with lib; {

View File

@ -20,6 +20,9 @@ buildPythonPackage rec {
ledgerblue libagent setuptools wheel
];
# no tests
doCheck = false;
meta = with stdenv.lib; {
description = "Using Ledger as hardware-based SSH/PGP agent";
homepage = "https://github.com/romanz/trezor-agent";

View File

@ -28,7 +28,7 @@ buildPythonPackage rec {
];
# does not contain tests
disableCheck = false;
doCheck = false;
pythonImportsCheck = [ "liquidctl" ];
meta = with lib; {

View File

@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchFromGitHub, cryptography, pytestCheckHook }:
buildPythonPackage rec {
pname = "noiseprotocol";
version = "0.3.1";
src = fetchFromGitHub {
owner = "plizonczyk";
repo = "noiseprotocol";
rev = "v${version}";
sha256 = "1mk0rqpjifdv3v1cjwkdnjbrfmzzjm9f3qqs1r8vii4j2wvhm6am";
};
propagatedBuildInputs = [ cryptography ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "noise" ];
meta = with lib; {
description = "Noise Protocol Framework";
homepage = "https://github.com/plizonczyk/noiseprotocol/";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -4,8 +4,9 @@
, databases
, typesystem
, aiosqlite
, pytest
, pytestCheckHook
, pytestcov
, typing-extensions
}:
buildPythonPackage rec {
@ -26,13 +27,12 @@ buildPythonPackage rec {
checkInputs = [
aiosqlite
pytest
pytestCheckHook
pytestcov
typing-extensions
];
checkPhase = ''
PYTHONPATH=$PYTHONPATH:. pytest
'';
pythonImportsCheck = [ "orm" ];
meta = with lib; {
description = "An async ORM";

View File

@ -1,7 +1,6 @@
{ lib, isPy3k, fetchFromGitHub, buildPythonPackage
, six, enum34, pyasn1, cryptography, singledispatch
, fetchPypi
, gpgme, flake8, pytest, pytestcov, pep8-naming, pytest-ordering }:
, fetchPypi, pytestCheckHook }:
buildPythonPackage rec {
pname = "pgpy";
@ -22,17 +21,10 @@ buildPythonPackage rec {
] ++ lib.optional (!isPy3k) enum34;
checkInputs = [
gpgme
flake8
pytest
pytestcov
pep8-naming
pytest-ordering
pytestCheckHook
];
checkPhase = ''
pytest
'';
disabledTests = [ "test_sign_string" "test_verify_string" ];
meta = with lib; {
homepage = "https://github.com/SecurityInnovation/PGPy";

View File

@ -46,6 +46,8 @@ buildPythonPackage rec {
pytestCheckHook
];
__darwinAllowLocalNetworking = true;
meta = with stdenv.lib; {
description = "A python client library for the Apple TV";
homepage = "https://github.com/postlund/pyatv";

View File

@ -1,9 +1,10 @@
{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib, isPy3k }:
{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib, isPy3k, pythonAtLeast }:
buildPythonPackage rec {
pname = "pygobject";
version = "2.28.7";
format = "other";
disabled = pythonAtLeast "3.9";
src = fetchurl {
url = "mirror://gnome/sources/pygobject/2.28/${pname}-${version}.tar.xz";

View File

@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchPypi, packaging, pytest, setuptools-scm }:
buildPythonPackage rec {
pname = "pytest-snapshot";
version = "0.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "1p33fcplfykwf5mdwg25n8hjgzxpx8w1iprjnfzibpxclfrxmy5i";
};
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ packaging pytest ];
# pypi does not contain tests and GitHub archive is not supported because setuptools-scm can't detect the version
doCheck = false;
pythonImportsCheck = [ "pytest_snapshot" ];
meta = with lib; {
description = "A plugin to enable snapshot testing with pytest";
homepage = "https://github.com/joseph-roitman/pytest-snapshot/";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -1,5 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi,
pytest }:
{ stdenv, buildPythonPackage, fetchPypi, idna, pytestCheckHook }:
buildPythonPackage rec {
pname = "rfc3986";
@ -10,14 +9,14 @@ buildPythonPackage rec {
sha256 = "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi";
};
checkInputs = [ pytest ];
checkPhase = ''
pytest
'';
propagatedBuildInputs = [ idna ];
checkInputs = [ pytestCheckHook ];
meta = with stdenv.lib; {
description = "Validating URI References per RFC 3986";
homepage = "https://rfc3986.readthedocs.org";
license = licenses.asl20;
description = "Validating URI References per RFC 3986";
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, python
, buildPythonPackage
, fetchpatch
@ -20,30 +21,37 @@
, cffi
, tzlocal
, simplegeneric
, pytest
, pytestCheckHook
, extraRPackages ? []
}:
buildPythonPackage rec {
version = "3.3.6";
version = "3.4.1";
pname = "rpy2";
disabled = isPyPy;
src = fetchPypi {
inherit version pname;
sha256 = "0xvfkxvh01r5ibd5mpisp8bz385hgpn27b988y8v65z7hqr3y1nf";
sha256 = "1qnjjlgh6i31z45jykwd29n1336gq678fn9zw7gh0rv5d6sn0hv4";
};
patches = [
# R_LIBS_SITE is used by the nix r package to point to the installed R libraries.
# This patch sets R_LIBS_SITE when rpy2 is imported.
./rpy2-3.x-r-libs-site.patch
];
postPatch = ''
substituteInPlace 'rpy2/rinterface_lib/embedded.py' --replace '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE"
substituteInPlace 'requirements.txt' --replace 'pytest' ""
'';
buildInputs = [
R
pcre
lzma
bzip2
zlib
icu
# is in the upstream `requires` although it shouldn't be -- this is easier than patching it away
pytest
] ++ (with rPackages; [
# packages expected by the test framework
ggplot2
@ -58,23 +66,10 @@ buildPythonPackage rec {
tidyr
]) ++ extraRPackages ++ rWrapper.recommendedPackages;
checkPhase = ''
pytest
'';
nativeBuildInputs = [
R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly)
];
patches = [
# R_LIBS_SITE is used by the nix r package to point to the installed R libraries.
# This patch sets R_LIBS_SITE when rpy2 is imported.
./rpy2-3.x-r-libs-site.patch
];
postPatch = ''
substituteInPlace 'rpy2/rinterface_lib/embedded.py' --replace '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE"
'';
propagatedBuildInputs = [
ipython
jinja2
@ -86,8 +81,10 @@ buildPythonPackage rec {
simplegeneric
];
doCheck = !stdenv.isDarwin;
checkInputs = [
pytest
pytestCheckHook
];
meta = {

View File

@ -20,6 +20,8 @@ buildPythonPackage rec {
# The tests use salmon executable installed by salmon itself so we need to add
# that to PATH
checkPhase = ''
# tests fail and pytest is not supported
rm tests/server_tests.py
PATH=$out/bin:$PATH python setup.py test
'';

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, pytest, sanic }:
{ lib, buildPythonPackage, fetchPypi, sanic }:
buildPythonPackage rec {
pname = "Sanic-Auth";
@ -11,11 +11,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [ sanic ];
checkInputs = [ pytest ];
# all tests fail
doCheck = false;
checkPhase = ''
pytest tests
'';
pythonImportsCheck = [ "sanic_auth" ];
meta = with lib; {
description = "Simple Authentication for Sanic";

View File

@ -36,6 +36,8 @@ buildPythonPackage rec {
"test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution.
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "A microframework based on uvloop, httptools, and learnings of flask";
homepage = "http://github.com/channelcat/sanic/";

View File

@ -42,12 +42,6 @@ buildPythonPackage rec {
propagatedBuildInputs = [ urllib3 certifi ];
meta = with stdenv.lib; {
homepage = "https://github.com/getsentry/sentry-python";
description = "New Python SDK for Sentry.io";
license = licenses.bsd2;
maintainers = with maintainers; [ gebner ];
};
# The Sentry tests need access to `/etc/protocols` (the tests call
# `socket.getprotobyname('tcp')`, which reads from this file). Normally
@ -57,5 +51,17 @@ buildPythonPackage rec {
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols
export LD_PRELOAD=${libredirect}/lib/libredirect.so
'';
postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
# no tests
doCheck = false;
pythonImportsCheck = [ "sentry_sdk" ];
meta = with stdenv.lib; {
homepage = "https://github.com/getsentry/sentry-python";
description = "New Python SDK for Sentry.io";
license = licenses.bsd2;
maintainers = with maintainers; [ gebner ];
};
}

View File

@ -42,5 +42,6 @@ buildPythonPackage rec {
homepage = "https://github.com/bivab/smbus-cffi";
license = licenses.gpl2;
maintainers = with maintainers; [ mic92 ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, fastdiff
, six
, termcolor
, pytestCheckHook
, pytest-cov
, django
}:
buildPythonPackage rec {
pname = "snapshottest";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "0g35ggqw4jd9zmazw55kj6gfjdghv49qx4jw5q231qyqj8fzijmv";
};
propagatedBuildInputs = [ fastdiff six termcolor ];
checkInputs = [ django pytestCheckHook pytest-cov ];
pythonImportsCheck = [ "snapshottest" ];
meta = with lib; {
description = "Snapshot testing for pytest, unittest, Django, and Nose";
homepage = "https://github.com/syrusakbary/snapshottest";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -2,25 +2,26 @@
, stdenv
, buildPythonPackage
, fetchFromGitHub
, isPy27
, aiofiles
, graphene
, itsdangerous
, jinja2
, python-multipart
, pyyaml
, requests
, ujson
, python-multipart
, pytest
, uvicorn
, isPy27
, darwin
, databases
, aiosqlite
, databases
, pytestCheckHook
, pytest-asyncio
, pytestcov
, typing-extensions
, ApplicationServices
}:
buildPythonPackage rec {
pname = "starlette";
version = "0.13.8";
disabled = isPy27;
@ -36,22 +37,21 @@ buildPythonPackage rec {
graphene
itsdangerous
jinja2
python-multipart
pyyaml
requests
ujson
uvicorn
python-multipart
databases
] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ];
] ++ lib.optional stdenv.isDarwin [ ApplicationServices ];
checkInputs = [
pytest
aiosqlite
databases
pytestCheckHook
typing-extensions
];
checkPhase = ''
pytest --ignore=tests/test_graphql.py
'';
pytestFlagsArray = [ "--ignore=tests/test_graphql.py" ];
pythonImportsCheck = [ "starlette" ];
meta = with lib; {

View File

@ -24,6 +24,9 @@ buildPythonPackage rec {
propagatedBuildInputs = [ setuptools trezor libagent ecdsa ed25519 mnemonic keepkey semver wheel pinentry ];
doCheck = false;
pythonImportsCheck = [ "libagent" ];
meta = with stdenv.lib; {
description = "Using Trezor as hardware SSH agent";
homepage = "https://github.com/romanz/trezor-agent";

View File

@ -2,7 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, isPy27
, pytest
, pytestCheckHook
, pytestcov
, jinja2
, pyyaml
@ -26,14 +26,11 @@ buildPythonPackage rec {
];
checkInputs = [
pytest
pytestCheckHook
pytestcov
];
# for some reason jinja2 not picking up forms directory (1% of tests)
checkPhase = ''
pytest --ignore=tests/test_forms.py
'';
disabledTests = [ "test_to_json_schema_complex_regular_expression" ];
meta = with lib; {
description = "A type system library for Python";

View File

@ -0,0 +1,73 @@
{ lib
, rustPlatform
, fetchFromGitHub
, maturin
, buildPythonPackage
, isPy38
, python
}:
let
pname = "wasmer";
version = "1.0.0-beta1";
wheel = rustPlatform.buildRustPackage rec {
name = "${pname}-${version}-py${python.version}";
src = fetchFromGitHub {
owner = "wasmerio";
repo = "wasmer-python";
rev = version;
sha256 = "0302lcfjlw7nz18nf86z6swhhpp1qnpwcsm2fj4avl22rsv0h78j";
};
cargoSha256 = "0d83dniijjq8rc4fcwj6ja5x4hxh187afnqfd8c9fzb8nx909a0v";
nativeBuildInputs = [ maturin python ];
preBuild = ''
cd packages/api
'';
buildPhase = ''
runHook preBuild
maturin build --release --manylinux off --strip
runHook postBuild
'';
postBuild = ''
cd ../..
'';
doCheck = false;
installPhase = ''
runHook preInstall
install -Dm644 -t $out target/wheels/*.whl
runHook postInstall
'';
};
in
buildPythonPackage rec {
inherit pname version;
# we can only support one python version because the cargo hash changes with the python version
disabled = !isPy38;
format = "wheel";
src = wheel;
unpackPhase = ''
mkdir -p dist
cp $src/*.whl dist
'';
pythonImportsCheck = [ "wasmer" ];
meta = with lib; {
description = "Python extension to run WebAssembly binaries";
homepage = "https://github.com/wasmerio/wasmer-python";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, ifaddr
@ -29,7 +30,10 @@ buildPythonPackage rec {
"test_launch_and_close_v4_v6"
"test_launch_and_close_v6_only"
"test_integration_with_listener_ipv6"
] ++ lib.optionals stdenv.isDarwin [
"test_lots_of_names"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "zeroconf" ];

View File

@ -380,6 +380,7 @@ let
rmutil = lib.optionals stdenv.isDarwin [ pkgs.libiconv ];
robustbase = lib.optionals stdenv.isDarwin [ pkgs.libiconv ];
SparseM = lib.optionals stdenv.isDarwin [ pkgs.libiconv ];
hexbin = lib.optionals stdenv.isDarwin [ pkgs.libiconv ];
svKomodo = [ pkgs.which ];
nat = [ pkgs.which ];
nat_templatebrains = [ pkgs.which ];

View File

@ -21,10 +21,12 @@ buildPythonApplication {
'';
buildInputs = [ libusb1 ];
propagatedBuildInputs =
[ psutil python3Packages.libusb1 ]
propagatedBuildInputs = [ psutil python3Packages.libusb1 ]
++ lib.optionals GyroplotSupport [ pyqtgraph pyside ];
doCheck = false;
pythonImportsCheck = [ "steamcontroller" ];
meta = with stdenv.lib; {
description = "A standalone Steam controller driver";
homepage = "https://github.com/ynsta/steamcontroller";

View File

@ -1,11 +1,8 @@
{ stdenv, fetchFromGitHub, python3Packages }:
let
pythonPackages = python3Packages;
in pythonPackages.buildPythonPackage rec {
name = "${pname}-0.1.0";
python3Packages.buildPythonPackage rec {
pname = "evdevremapkeys";
version = "0.1.0";
src = fetchFromGitHub {
owner = "philipl";
@ -14,13 +11,18 @@ in pythonPackages.buildPythonPackage rec {
sha256 = "0c9slflakm5jqd8s1zpxm7gmrrk0335m040d7m70hnsak42jvs2f";
};
propagatedBuildInputs = with pythonPackages; [
propagatedBuildInputs = with python3Packages; [
pyyaml
pyxdg
python-daemon
evdev
];
# hase no tests
doCheck = false;
pythonImportsCheck = [ "evdevremapkeys" ];
meta = with stdenv.lib; {
homepage = "https://github.com/philipl/evdevremapkeys";
description = "Daemon to remap events on linux input devices";

View File

@ -782,6 +782,8 @@ in {
backports_csv = callPackage ../development/python-modules/backports_csv { };
backports-datetime-fromisoformat = callPackage ../development/python-modules/backports-datetime-fromisoformat { };
backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };
backports_lzma = callPackage ../development/python-modules/backports_lzma { };
@ -892,6 +894,8 @@ in {
bitarray = callPackage ../development/python-modules/bitarray { };
bitbox02 = callPackage ../development/python-modules/bitbox02 { };
bitbucket_api = callPackage ../development/python-modules/bitbucket-api { };
bitbucket-cli = callPackage ../development/python-modules/bitbucket-cli { };
@ -2069,6 +2073,8 @@ in {
fastcache = callPackage ../development/python-modules/fastcache { };
fastdiff = callPackage ../development/python-modules/fastdiff { };
fastdtw = callPackage ../development/python-modules/fastdtw { };
fastecdsa = callPackage ../development/python-modules/fastecdsa { };
@ -2665,8 +2671,12 @@ in {
graph_nets = callPackage ../development/python-modules/graph_nets { };
graphene = callPackage ../development/python-modules/graphene { };
graphql-core = callPackage ../development/python-modules/graphql-core { };
graphql-relay = callPackage ../development/python-modules/graphql-relay { };
graphql-server-core = callPackage ../development/python-modules/graphql-server-core { };
graph-tool = callPackage ../development/python-modules/graph-tool/2.x.x.nix { inherit (pkgs) pkg-config; };
@ -4245,6 +4255,8 @@ in {
noise = callPackage ../development/python-modules/noise { };
noiseprotocol = callPackage ../development/python-modules/noiseprotocol { };
nose2 = callPackage ../development/python-modules/nose2 { };
nose = callPackage ../development/python-modules/nose { };
@ -5498,6 +5510,8 @@ in {
pyopengl = callPackage ../development/python-modules/pyopengl { };
pyopengl-accelerate = callPackage ../development/python-modules/pyopengl-accelerate { };
pyopenssl = callPackage ../development/python-modules/pyopenssl { };
pyosf = callPackage ../development/python-modules/pyosf { };
@ -5826,6 +5840,7 @@ in {
pytest-black = callPackage ../development/python-modules/pytest-black { };
pytest-cache = self.pytestcache; # added 2021-01-04
pytestcache = callPackage ../development/python-modules/pytestcache { };
pytest-catchlog = callPackage ../development/python-modules/pytest-catchlog { };
@ -5836,6 +5851,7 @@ in {
pytest-click = callPackage ../development/python-modules/pytest-click { };
pytest-cov = self.pytestcov; # self 2021-01-04
pytestcov = callPackage ../development/python-modules/pytest-cov { };
pytest-cram = callPackage ../development/python-modules/pytest-cram { };
@ -5872,8 +5888,6 @@ in {
pytest-helpers-namespace = callPackage ../development/python-modules/pytest-helpers-namespace { };
pyopengl-accelerate = callPackage ../development/python-modules/pyopengl-accelerate { };
pytest-html = callPackage ../development/python-modules/pytest-html { };
pytest-httpbin = callPackage ../development/python-modules/pytest-httpbin { };
@ -5901,6 +5915,7 @@ in {
pytest-pep257 = callPackage ../development/python-modules/pytest-pep257 { };
pytest-pep8 = self.pytestpep8; # added 2021-01-04
pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10
pytest-pylint = callPackage ../development/python-modules/pytest-pylint { };
@ -5909,6 +5924,7 @@ in {
pytest-qt = callPackage ../development/python-modules/pytest-qt { };
pytest-quickcheck = self.pytestquickcheck;
pytestquickcheck = callPackage ../development/python-modules/pytest-quickcheck { };
pytest-raisesregexp = callPackage ../development/python-modules/pytest-raisesregexp { };
@ -5925,6 +5941,7 @@ in {
pytest-rerunfailures = callPackage ../development/python-modules/pytest-rerunfailures { };
pytest-runner = self.pytestrunner; # added 2021-01-04
pytestrunner = callPackage ../development/python-modules/pytestrunner { };
pytest-sanic = callPackage ../development/python-modules/pytest-sanic { };
@ -5933,6 +5950,8 @@ in {
pytest-services = callPackage ../development/python-modules/pytest-services { };
pytest-snapshot = callPackage ../development/python-modules/pytest-snapshot { };
pytest-shutil = callPackage ../development/python-modules/pytest-shutil { };
pytest-socket = callPackage ../development/python-modules/pytest-socket { };
@ -5961,6 +5980,7 @@ in {
pytest-watch = callPackage ../development/python-modules/pytest-watch { };
pytest-xdist = self.pytest_xdist; # added 2021-01-04
pytest_xdist = if isPy27 then
callPackage ../development/python-modules/pytest-xdist/1.nix { }
else
@ -6829,6 +6849,7 @@ in {
setuptools-rust = callPackage ../development/python-modules/setuptools-rust { };
setuptools-scm = self.setuptools_scm; # added 2021-01-04
setuptools_scm = callPackage ../development/python-modules/setuptools_scm { };
setuptools-scm-git-archive = callPackage ../development/python-modules/setuptools-scm-git-archive { };
@ -6966,6 +6987,8 @@ in {
snapperGUI = callPackage ../development/python-modules/snappergui { };
snapshottest = callPackage ../development/python-modules/snapshottest { };
sniffio = callPackage ../development/python-modules/sniffio { };
snitun = callPackage ../development/python-modules/snitun { };
@ -7175,7 +7198,9 @@ in {
stack-data = callPackage ../development/python-modules/stack-data { };
starlette = callPackage ../development/python-modules/starlette { };
starlette = callPackage ../development/python-modules/starlette {
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices;
};
staticjinja = callPackage ../development/python-modules/staticjinja { };
@ -7887,6 +7912,8 @@ in {
wasabi = callPackage ../development/python-modules/wasabi { };
wasmer = callPackage ../development/python-modules/wasmer { };
watchdog = callPackage ../development/python-modules/watchdog { };
WazeRouteCalculator = callPackage ../development/python-modules/WazeRouteCalculator { };