Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyasn / default.nix
blob026b5fdff68388f8a918df01b44ef2d7848ac3c1
1 { lib, buildPythonPackage, fetchPypi, fetchFromGitHub, python, }:
3 buildPythonPackage rec {
4   pname = "pyasn";
5   version = "1.6.2";
7   src = fetchPypi {
8     inherit pname version;
9     hash = "sha256-otVfs+5HlHYJ9QIRylsLrEEahvPJNfuSyksLirfGaP8=";
10   };
12   datasrc = fetchFromGitHub {
13     owner = "hadiasghari";
14     repo = "pyasn";
15     rev = version;
16     hash = "sha256-R7Vi1Mn44Mg3HQLDk9O43MkXXwbLRr/jjVKSHJvgYj0";
17   };
19   postInstall = ''
20     install -dm755 $out/${python.sitePackages}/pyasn/data
21     cp $datasrc/data/* $out/${python.sitePackages}/pyasn/data
22   '';
24   doCheck = false; # Tests require internet connection which wont work
26   pythonImportsCheck = [ "pyasn" ];
28   meta = with lib; {
29     description = "Offline IP address to Autonomous System Number lookup module";
30     homepage = "https://github.com/hadiasghari/pyasn";
31     license = with licenses; [ bsdOriginal mit ];
32     maintainers = with maintainers; [ onny ];
33   };