2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, python3
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchPypi
|
|
|
|
, nix-update-script
|
|
|
|
, testers
|
|
|
|
, aws-encryption-sdk-cli
|
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
let
|
|
|
|
localPython = python3.override {
|
|
|
|
self = localPython;
|
|
|
|
packageOverrides = final: prev: {
|
|
|
|
urllib3 = prev.urllib3.overridePythonAttrs (prev: rec {
|
|
|
|
pyproject = true;
|
|
|
|
version = "1.26.18";
|
|
|
|
nativeBuildInputs = with final; [ setuptools ];
|
|
|
|
src = prev.src.override {
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-+OzBu6VmdBNFfFKauVW/jGe0XbeZ0VkGYmFxnjKFgKA=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
localPython.pkgs.buildPythonApplication rec {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "aws-encryption-sdk-cli";
|
|
|
|
version = "4.1.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-OCbt0OkDVfpzUIogbsKzaPAle2L6l6N3cmZoS2hEaSM=";
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = with localPython.pkgs; [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = with localPython.pkgs; [
|
2023-10-09 19:29:22 +00:00
|
|
|
attrs
|
|
|
|
aws-encryption-sdk
|
|
|
|
base64io
|
2024-01-02 11:29:13 +00:00
|
|
|
urllib3
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools # for pkg_resources
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeCheckInputs = with localPython.pkgs; [
|
2023-10-09 19:29:22 +00:00
|
|
|
mock
|
|
|
|
pytest-mock
|
2024-05-15 15:35:15 +00:00
|
|
|
pytest7CheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# requires networking
|
|
|
|
"test/integration"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Upstream did not adapt to pytest 8 yet.
|
|
|
|
pytestFlagsArray = [ "-W" "ignore::pytest.PytestRemovedIn8Warning" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = aws-encryption-sdk-cli;
|
|
|
|
command = "aws-encryption-cli --version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://aws-encryption-sdk-cli.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/aws/aws-encryption-sdk-cli/blob/v${version}/CHANGELOG.rst";
|
|
|
|
description = "CLI wrapper around aws-encryption-sdk-python";
|
|
|
|
license = licenses.asl20;
|
|
|
|
mainProgram = "aws-encryption-cli";
|
|
|
|
maintainers = with maintainers; [ anthonyroussel ];
|
|
|
|
};
|
|
|
|
}
|