depot/third_party/nixpkgs/pkgs/development/python-modules/ulid-transform/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

51 lines
1 KiB
Nix

{ lib
, cython
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "ulid-transform";
version = "0.8.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bdraco";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-isngr9CZ2YYuq+5s3p4HXrTU20vPqZGZ1r8mBoVkxiI=";
};
nativeBuildInputs = [
cython
poetry-core
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=ulid_transform --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"ulid_transform"
];
meta = with lib; {
description = "Library to create and transform ULIDs";
homepage = "https://github.com/bdraco/ulid-transform";
changelog = "https://github.com/bdraco/ulid-transform/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}