Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-01-17 17:08:16 +01:00
167 changed files with 3702 additions and 1266 deletions

View File

@@ -0,0 +1,187 @@
{ buildPythonPackage
, fetchPypi
, isPy37
, lib
# pythonPackages
, aiohttp
, androguard
, azure-identity
, azure-keyvault-keys
, azure-keyvault-secrets
, azure-mgmt-compute
, azure-mgmt-keyvault
, azure-mgmt-network
, azure-mgmt-storage
, azure-mgmt-web
, azure-storage-file
, bandit
, bcrypt
, beautifulsoup4
, boto3
, cfn-flip
, cython
, dnspython
, colorama
, configobj
, defusedxml
, GitPython
, google_api_python_client
, kubernetes
, ldap3
, mixpanel
, mysql-connector
, names
, ntplib
, oyaml
, paramiko
, pillow
, psycopg2
, pycrypto
, pygments
, pyjks
, pynacl
, pyopenssl
, pypdf2
, pysmb
, python_magic
, pytz
, requirements-detector
, selenium
, tlslite-ng
, viewstate
# pythonPackages to test the derivation
, pytest
}:
buildPythonPackage rec {
pname = "fluidasserts";
version = "20.1.22554";
disabled = !isPy37;
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "0j7zppwingi9m58z51phy40d69jlskx1vgyz1gj9miqhbjfdymhi";
};
patchPhase = ''
# Version mismatches between current FluidAsserts and Nixpkgs
substituteInPlace ./setup.py \
--replace 'tlslite-ng==0.8.0-alpha29' 'tlslite-ng==0.7.5' \
--replace 'boto3==1.10.17' 'boto3==1.10.1' \
--replace 'cfn-flip==1.2.2' 'cfn-flip==1.1.0.post1' \
--replace 'azure-mgmt-storage==7.1.0' 'azure-mgmt-storage==7.0.0' \
# Functionality that will be not present for the momment
# but that we'll work to add in the future
# Just a minimal portion of fluidasserts use this
substituteInPlace ./setup.py \
--replace "'azure-storage-file-share==12.0.0'," "" \
--replace "'pymssql==2.1.4'," "" \
--replace "'pytesseract==0.3.0'," "" \
--replace "'pywinrm==0.4.1'," "" \
'';
propagatedBuildInputs = [
# pythonPackages
aiohttp
androguard
azure-identity
azure-keyvault-keys
azure-keyvault-secrets
azure-mgmt-compute
azure-mgmt-keyvault
azure-mgmt-network
azure-mgmt-storage
azure-mgmt-web
azure-storage-file
bandit
bcrypt
beautifulsoup4
boto3
cfn-flip
cython
dnspython
colorama
configobj
defusedxml
GitPython
google_api_python_client
kubernetes
ldap3
mixpanel
mysql-connector
names
ntplib
oyaml
paramiko
pillow
psycopg2
pycrypto
pygments
pyjks
pynacl
pyopenssl
pypdf2
pysmb
python_magic
pytz
requirements-detector
selenium
tlslite-ng
viewstate
];
checkInputs = [
pytest
];
checkPhase = ''
# This file launches mock docker containers and servers
# let's remove it to create a custom test environment
rm test/conftest.py
pytest \
test/test_cloud_aws_cloudformation_cloudfront.py \
test/test_cloud_aws_cloudformation_dynamodb.py \
test/test_cloud_aws_cloudformation_ec2.py \
test/test_cloud_aws_cloudformation_elb.py \
test/test_cloud_aws_cloudformation_elb2.py \
test/test_cloud_aws_cloudformation_fsx.py \
test/test_cloud_aws_cloudformation_iam.py \
test/test_cloud_aws_cloudformation_kms.py \
test/test_cloud_aws_cloudformation_rds.py \
test/test_cloud_aws_cloudformation_s3.py \
test/test_cloud_aws_cloudformation_secretsmanager.py \
test/test_format_apk.py \
test/test_format_file.py \
test/test_format_jks.py \
test/test_format_jwt.py \
test/test_format_pdf.py \
test/test_format_pkcs12.py \
test/test_format_string.py \
test/test_helper_asynchronous.py \
test/test_helper_crypto.py \
test/test_lang_core.py \
test/test_lang_csharp.py \
test/test_lang_docker.py \
test/test_lang_dotnetconfig.py \
test/test_lang_html.py \
test/test_lang_php.py \
test/test_lang_python.py \
test/test_lang_rpgle.py \
'';
meta = with lib; {
description = "Assertion Library for Security Assumptions";
homepage = "https://gitlab.com/fluidattacks/asserts";
license = licenses.mpl20;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -1,30 +1,46 @@
{ stdenv
, buildPythonPackage
, fetchzip
, pytest
{ buildPythonPackage
, fetchFromGitHub
, isPy37
, lib
# Python Dependencies
, mock
, pytest
, six
, isPy3k
}:
buildPythonPackage rec {
version = "4.0.2";
pname = "mixpanel";
disabled = isPy3k;
version = "4.5.0";
disabled = !isPy37;
src = fetchzip {
url = "https://github.com/mixpanel/mixpanel-python/archive/${version}.zip";
sha256 = "0yq1bcsjzsz7yz4rp69izsdn47rvkld4wki2xmapp8gg2s9i8709";
src = fetchFromGitHub {
owner = "mixpanel";
repo = "mixpanel-python";
rev = version;
sha256 = "1hlc717wcn71i37ngsfb3c605rlyjhsn3v6b5bplq00373r4d39z";
};
checkInputs = [ pytest mock ];
propagatedBuildInputs = [ six ];
checkPhase = "py.test tests.py";
propagatedBuildInputs = [
six
];
meta = with stdenv.lib; {
homepage = https://github.com/mixpanel/mixpanel-python;
description = ''This is the official Mixpanel Python library'';
checkInputs = [
mock
pytest
];
checkPhase = ''
py.test
'';
meta = with lib; {
homepage = "https://github.com/mixpanel/mixpanel-python";
description = "Official Mixpanel Python library";
license = licenses.asl20;
maintainers = with maintainers; [
kamadorueda
];
};
}

View File

@@ -1,19 +1,27 @@
{ lib, buildPythonPackage, fetchFromGitHub
, protobuf
, python3, protobuf3_6
}:
buildPythonPackage rec {
let
python = python3.override {
packageOverrides = self: super: {
protobuf = super.protobuf.override {
protobuf = protobuf3_6;
};
};
};
in buildPythonPackage rec {
pname = "mysql-connector";
version = "8.0.18";
version = "8.0.19";
src = fetchFromGitHub {
owner = "mysql";
repo = "mysql-connector-python";
rev = version;
sha256 = "0pf91vbjigjv621dar47r741yvmdmapxh60wp20nzvlx0xchbmcm";
sha256 = "1jscmc5s7mwx43gvxjlqc30ylp5jjpmkqx7s3b9nllbh926p3ixg";
};
propagatedBuildInputs = [ protobuf ];
propagatedBuildInputs = with python.pkgs; [ protobuf dnspython ];
# Tests are failing (TODO: unknown reason)
# TypeError: __init__() missing 1 required positional argument: 'string'

View File

@@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchPypi, requests }:
buildPythonPackage rec {
pname = "pyTelegramBotAPI";
version = "3.6.6";
src = fetchPypi {
inherit pname version;
sha256 = "00vycd7jvfnzmvmmhkjx9vf40vkcrwv7adas5i81r2jhjy7sks54";
};
propagatedBuildInputs = [ requests ];
meta = with lib; {
homepage = "https://github.com/eternnoir/pyTelegramBotAPI";
description = "A simple, but extensible Python implementation for the Telegram Bot API";
license = licenses.gpl2;
maintainers = with maintainers; [ das_j ];
};
}

View File

@@ -0,0 +1,28 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pytest
, pytestrunner
, numpy
, pillow
}:
buildPythonPackage rec {
version = "1.3.0";
pname = "pydicom";
src = fetchPypi {
inherit pname version;
sha256 = "1j11lsykqbnw9d6gzgj6kfn6lawvm5d9azd9palj3l1xhj0hlnsq";
};
propagatedBuildInputs = [ numpy pillow ];
checkInputs = [ pytest pytestrunner ];
meta = with stdenv.lib; {
homepage = https://pydicom.github.io;
description = "Pure-Python package for working with DICOM files";
license = licenses.mit;
maintainers = with maintainers; [ bcdarwin ];
};
}

View File

@@ -1,33 +0,0 @@
{ buildPythonPackage, isPy3k, fetchFromGitHub, stdenv,
netcdf, hdf5, libminc, ezminc,
cython, numpy, scipy
}:
buildPythonPackage rec {
pname = "pyezminc";
version = "1.2.01";
disabled = isPy3k;
src = fetchFromGitHub {
owner = "BIC-MNI";
repo = "pyezminc";
rev = "release-${version}";
sha256 = "13smvramacisbwj8qsl160dnvv6ynngn1jmqwhvy146nmadphyv1";
};
nativeBuildInputs = [ cython ];
buildInputs = [ netcdf hdf5 libminc ezminc ];
propagatedBuildInputs = [ numpy scipy ];
NIX_CFLAGS_COMPILE = "-fpermissive";
doCheck = false; # e.g., expects test data in /opt
meta = {
homepage = https://github.com/BIC-MNI/pyezminc;
description = "Python API for libminc using EZMINC";
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ bcdarwin ];
};
}

View File

@@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, defusedxml
, requests
, pytest
, requests-mock
, mock
, pytestcov
, pytest-timeout
, testtools
}:
buildPythonPackage rec {
pname = "rxv";
version = "0.6.0";
src = fetchFromGitHub {
owner = "wuub";
repo = pname;
# Releases are not tagged
rev = "9b586203665031f93960543a272bb1a8f541ed37";
sha256 = "1dw3ayrzknai2279bhkgzcapzw06rhijlny33rymlbp7irp0gvnj";
};
propagatedBuildInputs = [ defusedxml requests ];
checkInputs = [ pytest requests-mock mock pytestcov pytest-timeout testtools ];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Automation Library for Yamaha RX-V473, RX-V573, RX-V673, RX-V773 receivers";
homepage = https://github.com/wuub/rxv;
license = licenses.mit;
maintainers = with maintainers; [ flyfloh ];
};
}