blob: 3990b8ed08271b691af4968182c5b333a650c8c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
python,
}:
buildPythonPackage rec {
pname = "pyasn";
version = "1.6.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-otVfs+5HlHYJ9QIRylsLrEEahvPJNfuSyksLirfGaP8=";
};
datasrc = fetchFromGitHub {
owner = "hadiasghari";
repo = "pyasn";
rev = version;
hash = "sha256-7zpaxDe5qHUy/ekOJLxKawjaPQnByrOVj+m2bsUqfdg=";
};
postInstall = ''
install -dm755 $out/${python.sitePackages}/pyasn/data
cp $datasrc/data/* $out/${python.sitePackages}/pyasn/data
'';
doCheck = false; # Tests require internet connection which wont work
pythonImportsCheck = [ "pyasn" ];
meta = {
description = "Offline IP address to Autonomous System Number lookup module";
homepage = "https://github.com/hadiasghari/pyasn";
license = with lib.licenses; [
bsdOriginal
mit
];
maintainers = with lib.maintainers; [ onny ];
};
}
|