nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 setuptools,
7 requests,
8 requests-mock,
9}:
10
11buildPythonPackage rec {
12 pname = "packet-python";
13 version = "1.44.3";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-WVfMELOoml7Hx78jy6TAwlFRLuSQu9dtsb6Khs6/cgI=";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py \
23 --replace-fail "pytest-runner" ""
24 '';
25
26 build-system = [ setuptools ];
27
28 dependencies = [ requests ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 requests-mock
33 ];
34
35 pythonImportsCheck = [ "packet" ];
36
37 meta = {
38 description = "Python client for the Packet API";
39 homepage = "https://github.com/packethost/packet-python";
40 changelog = "https://github.com/packethost/packet-python/blob/v${version}/CHANGELOG.md";
41 license = lib.licenses.lgpl3Only;
42 maintainers = with lib.maintainers; [ dipinhora ];
43 };
44}