Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 81aafb22ffab
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7d3e3cdf84f3
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 16, 2020

  1. fluidasserts: init at 20.1.22554

    kamadorueda authored and Jon committed Jan 16, 2020
    Copy the full SHA
    9dadd15 View commit details
  2. pythonPackages.mixpanel: 4.0.2 -> 4.5.0

    kamadorueda authored and Jon committed Jan 16, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7d3e3cd View commit details
187 changes: 187 additions & 0 deletions pkgs/development/python-modules/fluidasserts/default.nix
Original file line number Diff line number Diff line change
@@ -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
];
};
}
50 changes: 33 additions & 17 deletions pkgs/development/python-modules/mixpanel/default.nix
Original file line number Diff line number Diff line change
@@ -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
];
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -3242,6 +3242,8 @@ in
stdenv = gccStdenv;
};

fluidasserts = with python37Packages; toPythonApplication fluidasserts;

flux = callPackage ../development/compilers/flux { };

fido2luks = callPackage ../tools/security/fido2luks {};
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -674,6 +674,8 @@ in {

flufl_lock = callPackage ../development/python-modules/flufl/lock.nix { };

fluidasserts = callPackage ../development/python-modules/fluidasserts { };

foxdot = callPackage ../development/python-modules/foxdot { };

fsspec = callPackage ../development/python-modules/fsspec { };