mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
Merge pull request #220448 from fabaff/findcdn
python310Packages.ipwhois: init at 1.2.0
This commit is contained in:
commit
5a273e3b83
71
pkgs/development/python-modules/ipwhois/default.nix
Normal file
71
pkgs/development/python-modules/ipwhois/default.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, dnspython
|
||||
, fetchFromGitHub
|
||||
, iana-etc
|
||||
, libredirect
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ipwhois";
|
||||
version = "1.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "secynic";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-2CfRRHlIIaycUtzKeMBKi6pVPeBCb1nW3/1hoxQU1YM=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"dnspython"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dnspython
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"ipwhois"
|
||||
];
|
||||
|
||||
preCheck = lib.optionalString stdenv.isLinux ''
|
||||
echo "nameserver 127.0.0.1" > resolv.conf
|
||||
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
|
||||
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require network access
|
||||
"ipwhois/tests/online/"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
"test_lookup"
|
||||
"test_unique_addresses"
|
||||
"test_get_http_json"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library to retrieve and parse whois data";
|
||||
homepage = "https://github.com/secynic/ipwhois";
|
||||
changelog = "https://github.com/secynic/ipwhois/blob/v${version}/CHANGES.rst";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -4784,6 +4784,8 @@ self: super: with self; {
|
||||
|
||||
ipwhl = callPackage ../development/python-modules/ipwhl { };
|
||||
|
||||
ipwhois = callPackage ../development/python-modules/ipwhois { };
|
||||
|
||||
ipy = callPackage ../development/python-modules/IPy { };
|
||||
|
||||
ipydatawidgets = callPackage ../development/python-modules/ipydatawidgets { };
|
||||
|
Loading…
Reference in New Issue
Block a user