2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
}:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyasn";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.6.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-otVfs+5HlHYJ9QIRylsLrEEahvPJNfuSyksLirfGaP8=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
datasrc = fetchFromGitHub {
|
|
|
|
owner = "hadiasghari";
|
|
|
|
repo = "pyasn";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-R7Vi1Mn44Mg3HQLDk9O43MkXXwbLRr/jjVKSHJvgYj0";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -dm755 $out/${python.sitePackages}/pyasn/data
|
|
|
|
cp $datasrc/data/* $out/${python.sitePackages}/pyasn/data
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
doCheck = false; # Tests require internet connection which wont work
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyasn" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Offline IP address to Autonomous System Number lookup module";
|
|
|
|
homepage = "https://github.com/hadiasghari/pyasn";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
bsdOriginal
|
|
|
|
mit
|
|
|
|
];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
|
|
|
}
|