diff --git a/pkgs/by-name/pa/pacu/package.nix b/pkgs/by-name/pa/pacu/package.nix index 91122b15a79d..78491c24c697 100644 --- a/pkgs/by-name/pa/pacu/package.nix +++ b/pkgs/by-name/pa/pacu/package.nix @@ -1,17 +1,16 @@ -{ lib -, awscli -, fetchFromGitHub -, python3 +{ + lib, + awscli, + fetchFromGitHub, + python3, }: - let python = python3.override { - packageOverrides = self: super: { - sqlalchemy = super.sqlalchemy_1_4; - }; + packageOverrides = self: super: { sqlalchemy = super.sqlalchemy_1_4; }; }; -in python.pkgs.buildPythonApplication rec { +in +python.pkgs.buildPythonApplication rec { pname = "pacu"; version = "1.5.2"; pyproject = true; @@ -27,34 +26,34 @@ in python.pkgs.buildPythonApplication rec { "dsnap" "sqlalchemy-utils" "sqlalchemy" + "pycognito" "urllib3" ]; - nativeBuildInputs = with python.pkgs; [ - poetry-core - pythonRelaxDepsHook - ]; + build-system = with python.pkgs; [ poetry-core ]; - propagatedBuildInputs = [ - awscli - ] ++ (with python.pkgs; [ - awscli - boto3 - botocore - chalice - dsnap - jq - policyuniverse - pycognito - pyyaml - qrcode - requests - sqlalchemy - sqlalchemy-utils - toml - typing-extensions - urllib3 - ]); + nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ]; + + dependencies = + [ awscli ] + ++ (with python.pkgs; [ + awscli + boto3 + botocore + chalice + dsnap + jq + policyuniverse + pycognito + pyyaml + qrcode + requests + sqlalchemy + sqlalchemy-utils + toml + typing-extensions + urllib3 + ]); nativeCheckInputs = with python.pkgs; [ moto @@ -65,13 +64,12 @@ in python.pkgs.buildPythonApplication rec { export HOME=$(mktemp -d) ''; - pythonImportsCheck = [ - "pacu" - ]; + pythonImportsCheck = [ "pacu" ]; disabledTests = [ - # sqlalchemy.exc.ArgumentError: Textual SQL expression - #"test_migrations" + # sAttributeError: module 'moto' has no attribute 'mock_s3' + "test_update" + "test_update_second_time" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/dsnap/default.nix b/pkgs/development/python-modules/dsnap/default.nix index d67cb02aa112..f14636df0654 100644 --- a/pkgs/development/python-modules/dsnap/default.nix +++ b/pkgs/development/python-modules/dsnap/default.nix @@ -1,17 +1,18 @@ -{ lib -, aws-sam-cli -, boto3 -, buildPythonPackage -, cfn-lint -, fetchFromGitHub -, mock -, moto -, mypy-boto3-ebs -, poetry-core -, pytestCheckHook -, pythonOlder -, typer -, urllib3 +{ + lib, + aws-sam-cli, + boto3, + buildPythonPackage, + cfn-lint, + fetchFromGitHub, + mock, + moto, + mypy-boto3-ebs, + poetry-core, + pytestCheckHook, + pythonOlder, + typer, + urllib3, }: buildPythonPackage rec { @@ -31,22 +32,18 @@ buildPythonPackage rec { postPatch = '' # Is no direct dependency substituteInPlace pyproject.toml \ - --replace 'urllib3 = "^1.26.4"' 'urllib3 = "*"' + --replace-fail 'urllib3 = "^1.26.4"' 'urllib3 = "*"' ''; - nativeBuildInputs = [ - poetry-core - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ boto3 urllib3 ]; passthru.optional-dependencies = { - cli = [ - typer - ]; + cli = [ typer ]; scannerd = [ aws-sam-cli cfn-lint @@ -60,17 +57,18 @@ buildPythonPackage rec { pytestCheckHook ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); - pythonImportsCheck = [ - "dsnap" - ]; + # https://github.com/RhinoSecurityLabs/dsnap/issues/26 + # ImportError: cannot import name 'mock_iam' from 'moto' + doCheck = false; + + pythonImportsCheck = [ "dsnap" ]; meta = with lib; { description = "Utility for downloading and mounting EBS snapshots using the EBS Direct API's"; - mainProgram = "dsnap"; homepage = "https://github.com/RhinoSecurityLabs/dsnap"; changelog = "https://github.com/RhinoSecurityLabs/dsnap/releases/tag/v${version}"; license = licenses.bsd3; maintainers = with maintainers; [ fab ]; + mainProgram = "dsnap"; }; } -