This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
45 lines
986 B
Nix
45 lines
986 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 ];
|
|
};
|
|
}
|