nixpkgs/pkgs/development/python-modules/py-cid/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

56 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, base58
, py-multibase
, py-multicodec
, morphys
, py-multihash
, hypothesis
}:
buildPythonPackage rec {
pname = "py-cid";
version = "0.3.0";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "ipld";
repo = pname;
rev = "v${version}";
hash = "sha256-aN7ee25ghKKa90+FoMDCdGauToePc5AzDLV3tONvh4U=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "base58>=1.0.2,<2.0" "base58>=1.0.2" \
--replace "py-multihash>=0.2.0,<1.0.0" "py-multihash>=0.2.0" \
--replace "'pytest-runner'," ""
'';
propagatedBuildInputs = [
base58
py-multibase
py-multicodec
morphys
py-multihash
];
nativeCheckInputs = [
pytestCheckHook
hypothesis
];
pythonImportsCheck = [ "cid" ];
meta = with lib; {
description = "Self-describing content-addressed identifiers for distributed systems implementation in Python";
homepage = "https://github.com/ipld/py-cid";
license = licenses.mit;
maintainers = with maintainers; [ Luflosi ];
};
}