9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
34 lines
935 B
Nix
34 lines
935 B
Nix
{ lib, buildPythonPackage, fetchPypi, fetchFromGitHub, python, }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyasn";
|
|
version = "1.6.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-6UK1SRY2Pse4tw6urs0OtOQe8bz0ojl7KabXFfzN+SU=";
|
|
};
|
|
|
|
datasrc = fetchFromGitHub {
|
|
owner = "hadiasghari";
|
|
repo = "pyasn";
|
|
rev = version;
|
|
hash = "sha256-R7Vi1Mn44Mg3HQLDk9O43MkXXwbLRr/jjVKSHJvgYj0";
|
|
};
|
|
|
|
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 = with lib; {
|
|
description = "Offline IP address to Autonomous System Number lookup module";
|
|
homepage = "https://github.com/hadiasghari/pyasn";
|
|
license = with licenses; [ bsdOriginal mit ];
|
|
maintainers = with maintainers; [ onny ];
|
|
};
|
|
}
|