nixpkgs/pkgs/by-name/aw/awslimitchecker/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

64 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "awslimitchecker";
version = "12.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jantman";
repo = "awslimitchecker";
rev = "refs/tags/${version}";
hash = "sha256-+8F7qOfAFoFNZ6GG5ezTA/LWENpJvbcPdtpQH/8k1tw=";
};
patches = [
# Fix the version lookup to use only the hardcoded version in the source package
./version.patch
];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
boto3
botocore
pytz
termcolor
versionfinder
];
nativeCheckInputs = with python3.pkgs; [
freezegun
onetimepass
pyotp
mock
(pytestCheckHook.override { pytest = pytest_7; })
testfixtures
];
disabledTestPaths = [
# AWS tests that use the network
"awslimitchecker/tests/services"
"awslimitchecker/tests/test_checker.py"
"awslimitchecker/tests/test_runner.py"
# the version lookup tests as patched above
"awslimitchecker/tests/test_version.py"
];
pythonImportsCheck = [ "awslimitchecker.checker" ];
meta = with lib; {
description = "Script and python package to check your AWS service limits and usage via boto3";
homepage = "http://awslimitchecker.readthedocs.org";
changelog = "https://github.com/jantman/awslimitchecker/blob/${version}/CHANGES.rst";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ zakame ];
mainProgram = "awslimitchecker";
};
}