Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk
2020-01-05 16:10:35 +01:00
146 changed files with 3509 additions and 1340 deletions

View File

@@ -0,0 +1,53 @@
{ buildPythonPackage
, fetchPypi
, isPy38
, lib
# pythonPackages
, azure-common
, azure-core
, azure-nspkg
, cryptography
, mock
, msal
, msal-extensions
, msrest
, msrestazure
}:
buildPythonPackage rec {
pname = "azure-identity";
version = "1.1.0";
disabled = isPy38;
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "1xn4nwi4vly8n3mmphv0wbdg9k55gsgmk3fdwma8rm3m3c7593hc";
};
propagatedBuildInputs = [
azure-common
azure-core
azure-nspkg
cryptography
mock
msal
msal-extensions
msrest
msrestazure
];
# Requires checkout from mono-repo and a mock account:
# https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/identity/tests.yml
doCheck = false;
meta = with lib; {
description = "Microsoft Azure Identity Library for Python";
homepage = "https://github.com/Azure/azure-sdk-for-python";
license = licenses.mit;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,35 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, azure-nspkg
}:
buildPythonPackage rec {
pname = "azure-keyvault-nspkg";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "0hdnd6124hx7s16z1pssmq5m5mqqqz8s38ixl9aayv4wmf5bhs5c";
};
propagatedBuildInputs = [
azure-nspkg
];
# Just a namespace package, no tests exist:
# https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/keyvault/tests.yml
doCheck = false;
meta = with lib; {
description = "Microsoft Azure Key Vault Namespace Package [Internal]";
homepage = "https://github.com/Azure/azure-sdk-for-python";
license = licenses.mit;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,44 @@
{ buildPythonPackage
, fetchPypi
, lib
, isPy3k
# pythonPackages
, GitPython
, pbr
, pyyaml
, six
, stevedore
}:
buildPythonPackage rec {
pname = "bandit";
version = "1.6.2";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0rb034c99pyhb4a60z7f2kz40cjydhm8m9v2blaal1rmhlam7rs1";
};
propagatedBuildInputs = [
GitPython
pbr
pyyaml
six
stevedore
];
# Framework is Tox, tox performs 'pip install' inside the virtual-env
# and this requires Network Connectivity
doCheck = false;
meta = {
description = "Security oriented static analyser for python code";
homepage = "https://bandit.readthedocs.io/en/latest/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,38 @@
{ enum-compat
, lib
, buildPythonPackage
, fetchFromGitHub
, nose
, python
}:
buildPythonPackage rec {
pname = "bashlex";
version = "0.14";
src = fetchFromGitHub {
owner = "idank";
repo = pname;
rev = version;
sha256 = "070spmbf53y18miky5chgky4x5h8kp9czkp7dm173klv9pi2cn0k";
};
checkInputs = [ nose ];
propagatedBuildInputs = [ enum-compat ];
# workaround https://github.com/idank/bashlex/issues/51
preBuild = ''
${python.interpreter} -c 'import bashlex'
'';
checkPhase = ''
${python.interpreter} -m nose --with-doctest
'';
meta = with lib; {
description = "Python parser for bash";
license = licenses.gpl3;
homepage = https://github.com/idank/bashlex;
maintainers = with maintainers; [ multun ];
};
}

View File

@@ -3,7 +3,6 @@
buildPythonPackage rec {
pname = "cachetools";
version = "4.0.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;

View File

@@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, bashlex
, click
, shutilwhich
, gcc
, coreutils
}:
buildPythonPackage rec {
pname = "compiledb";
version = "0.10.1";
src = fetchFromGitHub {
owner = "nickdiego";
repo = pname;
rev = "v${version}";
sha256 = "0qricdgqzry7j3rmgwyd43av3c2kxpzkh6f9zcqbzrjkn78qbpd4";
};
# fix the tests
patchPhase = ''
substituteInPlace tests/data/multiple_commands_oneline.txt \
--replace /bin/echo ${coreutils}/bin/echo
'';
checkInputs = [ pytest gcc coreutils ];
propagatedBuildInputs = [ click bashlex shutilwhich ];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Tool for generating Clang's JSON Compilation Database files";
license = licenses.gpl3;
homepage = https://github.com/nickdiego/compiledb;
maintainers = with maintainers; [ multun ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, fetchurl, python, cairomm, sparsehash, pycairo, autoreconfHook
, pkgconfig, boost, expat, scipy, cgal, gmp, mpfr
, pkg-config, boost, expat, scipy, cgal, gmp, mpfr
, gobject-introspection, pygobject3, gtk3, matplotlib, ncurses
, buildPythonPackage
, fetchpatch
@@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "graph-tool";
format = "other";
version = "2.27";
version = "2.29";
meta = with stdenv.lib; {
description = "Python module for manipulation and statistical analysis of graphs";
@@ -21,25 +21,9 @@ buildPythonPackage rec {
src = fetchurl {
url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2";
sha256 = "04s31qwlfcl7bwsggnic8gqcqmx2wsrmfw77nf7vzgnz42bwch27";
sha256 = "0ykzcnqc5bhqb4xlf9ahpp807vj5868xdrmcj6fggqnnpqv4633c";
};
patches = [
# fix build with cgal 4.13 (https://git.skewed.de/count0/graph-tool/issues/509)
(fetchpatch {
name = "cgal-4.13.patch";
url = "https://git.skewed.de/count0/graph-tool/commit/aa39e4a6b42d43fac30c841d176c75aff92cc01a.patch";
sha256 = "1578inb4jqwq2fhhwscn5z95nzmaxvmvk30nzs5wirr26iznap4m";
})
] ++ (lib.optionals (pythonAtLeast "3.7") [
# # python 3.7 compatibility (`async` is now reserved)
(fetchpatch {
name = "async-reserved.patch";
url = "https://git.skewed.de/count0/graph-tool/commit/0407f41a35b6be7c670927fb5dc578cbd0e88be4.patch";
sha256 = "1fklznhmfvbb3ykwzyf8p2hiczby6y7r0xnkkjl2jkxlvr24000q";
})
]);
configureFlags = [
"--with-python-module-path=$(out)/${python.sitePackages}"
"--with-boost-libdir=${boost}/lib"
@@ -48,7 +32,7 @@ buildPythonPackage rec {
"--enable-openmp"
];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ ncurses ];
propagatedBuildInputs = [

View File

@@ -33,7 +33,7 @@ buildPythonPackage rec {
})
];
checkInputs = [ pytestCheckHook nose ];
checkInputs = [ pytestCheckHook nose flaky ];
dontUseSetuptoolsCheck = true;
preCheck = ''
export HOME=$(mktemp -d)

View File

@@ -0,0 +1,26 @@
{ buildPythonPackage
, fetchPypi
, lib
}:
buildPythonPackage rec {
pname = "javaobj-py3";
version = "0.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "0j9532i7bnjd0v4a8c36mjj9rsdnbmckk65dh9sbmvnhy3j6jx55";
};
# Tests assume network connectivity
doCheck = false;
meta = {
description = "Module for serializing and de-serializing Java objects";
homepage = "https://github.com/tcalmant/python-javaobj";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, isPy27, pytest, colorama }:
{ stdenv, buildPythonPackage, fetchPypi, isPy27, colorama, pytestCheckHook }:
buildPythonPackage rec {
pname = "loguru";
@@ -10,12 +10,12 @@ buildPythonPackage rec {
sha256 = "d5ddf363b7e0e562652f283f74a89bf35601baf16b70f2cd2736a2f8c6638748";
};
checkInputs = [ pytest colorama ];
checkPhase = ''
pytest -k 'not test_time_rotation_reopening'
'';
checkInputs = [ pytestCheckHook colorama ];
meta = with lib; {
disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ]
++ stdenv.lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" ];
meta = with stdenv.lib; {
homepage = https://github.com/Delgan/loguru;
description = "Python logging made (stupidly) simple";
license = licenses.mit;

View File

@@ -0,0 +1,35 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, msal
, portalocker
}:
buildPythonPackage rec {
pname = "msal-extensions";
version = "0.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "1p05cbfksnhijx1il7s24js2ydzgxbpiasf607qdpb5sljlp3qar";
};
propagatedBuildInputs = [
msal
portalocker
];
# No tests found
doCheck = false;
meta = with lib; {
description = "The Microsoft Authentication Library Extensions (MSAL-Extensions) for Python";
homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python";
license = licenses.mit;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,36 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, pyjwt
, requests
}:
buildPythonPackage rec {
pname = "msal";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "0h33wayvakggr684spdyhiqvrwraavcbk3phmcbavb3zqxd3zgpc";
};
propagatedBuildInputs = [
pyjwt
requests
];
# Tests assume Network Connectivity:
# https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73
doCheck = false;
meta = with lib; {
description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect";
homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python";
license = licenses.mit;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, twine
, numpy
, pytest
, fetchPypi
}:
buildPythonPackage rec {
pname = "nagiosplugin";
version = "1.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "1vr3zy0zfvbrqc4nf81zxv4gs2q82sv5sjamdm4573ld529mk2nv";
};
nativeBuildInputs = [ twine ];
checkInputs = [ pytest numpy ];
checkPhase = ''
# this test relies on who, which does not work in the sandbox
pytest -k "not test_check_users" tests/
'';
meta = with lib; {
description = "A Python class library which helps with writing Nagios (Icinga) compatible plugins";
homepage = https://github.com/mpounsett/nagiosplugin;
license = licenses.zpl21;
maintainers = with maintainers; [ symphorien ];
};
}

View File

@@ -0,0 +1,36 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
# pythonPackages
, pytest
}:
buildPythonPackage rec {
pname = "names";
version = "0.3.0";
src = fetchFromGitHub {
owner = "treyhunner";
repo = pname;
rev = version;
sha256 = "0jfn11bl05k3qkqw0f4vi2i2lhllxdrbb1732qiisdy9fbvv8611";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = {
description = "Generate random names";
homepage = "https://github.com/treyhunner/names";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,41 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
# pythonPackages
, pytest
, pyyaml
}:
buildPythonPackage rec {
pname = "oyaml";
version = "0.9";
src = fetchFromGitHub {
owner = "wimglenn";
repo = "oyaml";
rev = "v${version}";
sha256 = "13xjdym0p0jh9bvyjsbhi4yznlp68bamy3xi4w5wpcrzlcq6cfh9";
};
propagatedBuildInputs = [
pyyaml
];
checkInputs = [
pytest
];
checkPhase = ''
pytest test_oyaml.py
'';
meta = {
description = "Ordered YAML: drop-in replacement for PyYAML which preserves dict ordering";
homepage = "https://github.com/wimglenn/oyaml";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,37 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, pyasn1-modules
, pycryptodomex
, twofish
}:
buildPythonPackage rec {
pname = "pyjks";
version = "19.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "06h1cybsdj2wi0jf7igbr722xfm87crqn4g7m3bgrpxwi41b9rcw";
};
propagatedBuildInputs = [
pyasn1-modules
pycryptodomex
twofish
];
# Tests assume network connectivity
doCheck = false;
meta = {
description = "Pure-Python Java Keystore (JKS) library";
homepage = "https://github.com/kurtbrose/pyjks";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -10,6 +10,7 @@
, flaky
, glibcLocales
, six
, fetchpatch
}:
with stdenv.lib;
@@ -80,6 +81,27 @@ buildPythonPackage rec {
runHook postCheck
'';
patches = [
# 4 patches for 2020 bug
# https://github.com/pyca/pyopenssl/pull/828
(fetchpatch {
url = https://github.com/pyca/pyopenssl/commit/0d2fd1a24b30077ead6960bd63b4a9893a57c101.patch;
sha256 = "1c27g53qrwxddyx04sxf8yvj7xgbaabla7mc1cgbfd426rncbqf3";
})
(fetchpatch {
url = https://github.com/pyca/pyopenssl/commit/d08a742573c3205348a4eec9a65abaf6c16110c4.patch;
sha256 = "18xn8s1wpycz575ivrbsbs0qd2q48z8pdzsjzh8i60xba3f8yj2f";
})
(fetchpatch {
url = https://github.com/pyca/pyopenssl/commit/60b9e10e6da7ccafaf722def630285f54510ed12.patch;
sha256 = "0aw8qvy8m0bhgp39lmbcrpprpg4bhpssm327hyrk476wwgajk01j";
})
(fetchpatch {
url = https://github.com/pyca/pyopenssl/commit/7a37cc23fcbe43abe785cd4badd14bdc7acfb175.patch;
sha256 = "1c7zb568rs71rsl16p6dq7aixwlkgzfnba4vzmfvbmy3zsnaslq2";
})
];
# Seems to fail unpredictably on Darwin. See http://hydra.nixos.org/build/49877419/nixlog/1
# for one example, but I've also seen ContextTests.test_set_verify_callback_exception fail.
doCheck = !stdenv.isDarwin;

View File

@@ -0,0 +1,36 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, pyasn1
}:
buildPythonPackage rec {
pname = "pysmb";
version = "1.1.28";
src = fetchPypi {
inherit pname version;
format = "setuptools";
extension = "zip";
sha256 = "0x44yq440c1j3xnl7qigz2fpfzhx68n9mbj7ps7rd0kj0plcmr2q";
};
propagatedBuildInputs = [
pyasn1
];
# Tests require Network Connectivity and a server up and running
# https://github.com/miketeo/pysmb/blob/master/python3/tests/README_1st.txt
doCheck = false;
meta = {
description = "Experimental SMB/CIFS library written in Python to support file sharing between Windows and Linux machines";
homepage = "https://miketeo.net/wp/index.php/projects/pysmb";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,38 @@
{ buildPythonPackage
, fetchFromGitHub
, isPy27
, lib
# pythonPackages
, pytest
}:
buildPythonPackage rec {
pname = "requirements-detector";
version = "0.6";
disabled = isPy27;
src = fetchFromGitHub {
owner = "yuvadm";
repo = pname;
rev = version;
sha256 = "15s0n1lhkz0zwi33waqkkjipal3f7s45rxsj1bw89xpr4dj87qx5";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = {
description = "Python tool to find and list requirements of a Python project";
homepage = "https://github.com/landscapeio/requirements-detector";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
}:
buildPythonPackage rec {
pname = "shutilwhich";
version = "1.1.0";
src = fetchFromGitHub {
owner = "mbr";
repo = pname;
rev = version;
sha256 = "05fwcjn86w8wprck04iv1zccfi39skdf0lhwpb4b9gpvklyc9mj0";
};
checkInputs = [ pytest ];
checkPhase = ''
pytest -rs
'';
meta = with lib; {
description = "Backport of shutil.which";
license = licenses.psfl;
homepage = https://github.com/mbr/shutilwhich;
maintainers = with maintainers; [ multun ];
};
}

View File

@@ -0,0 +1,33 @@
{ buildPythonPackage
, fetchPypi
, lib
# pythonPackages
, javaobj-py3
}:
buildPythonPackage rec {
pname = "twofish";
version = "0.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1yihp2n42amrxw0wk9f66llpb3w5kwhgkcdg9krkzcik1nsqp7dh";
};
propagatedBuildInputs = [
javaobj-py3
];
# No tests implemented
doCheck = false;
meta = {
description = "Bindings for the Twofish implementation by Niels Ferguson";
homepage = "https://github.com/keybase/python-twofish";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}

View File

@@ -1,23 +1,23 @@
{ stdenv, buildPackages, buildPythonPackage, fetchPypi }:
{ stdenv, buildPythonPackage, setuptools, unicorn-emu }:
buildPythonPackage rec {
pname = "unicorn";
version = "1.0.1";
version = stdenv.lib.getVersion unicorn-emu;
src = fetchPypi {
inherit pname version;
sha256 = "0a5b4vh734b3wfkgapzzf8x18rimpmzvwwkly56da84n27wfw9bg";
};
src = unicorn-emu.src;
sourceRoot = "unicorn-${version}/bindings/python";
# needs python2 at build time
PYTHON=buildPackages.python2.interpreter;
prePatch = ''
ln -s ${unicorn-emu}/lib/libunicorn${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
'';
setupPyBuildFlags = [ "--plat-name" "linux" ];
propagatedBuildInputs = [ setuptools ];
meta = with stdenv.lib; {
description = "Unicorn CPU emulator engine";
description = "Python bindings for Unicorn CPU emulator engine";
homepage = "http://www.unicorn-engine.org/";
license = [ licenses.gpl2 ];
maintainers = [ maintainers.bennofs ];
maintainers = with maintainers; [ bennofs ris ];
};
}

View File

@@ -0,0 +1,36 @@
{ buildPythonPackage
, fetchFromGitHub
, isPy3k
, lib
, pytest
}:
buildPythonPackage rec {
pname = "viewstate";
version = "0.4.3";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "yuvadm";
repo = pname;
rev = "v${version}";
sha256 = "15s0n1lhkz0zwi33waqkkjipal3f7s45rxsj1bw89xpr4dj87qx5";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = {
description = ".NET viewstate decoder";
homepage = "https://github.com/yuvadm/viewstate";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
kamadorueda
];
};
}