nixpkgs/pkgs/development/python-modules/pyasn/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

35 lines
960 B
Nix

{ 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-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 ];
};
}