Files
nixpkgs/pkgs/development/python-modules/python-ulid/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

55 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
hatch-fancy-pypi-readme,
hatch-vcs,
hatchling,
pydantic,
freezegun,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "python-ulid";
version = "3.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "mdomke";
repo = "python-ulid";
tag = version;
hash = "sha256-ZMz1LqGJDgaMq4BNU33OPOQfoXFFuwFGcplnqtXSOHA=";
};
build-system = [
hatch-fancy-pypi-readme
hatch-vcs
hatchling
];
optional-dependencies = {
pydantic = [ pydantic ];
};
nativeCheckInputs = [
freezegun
pytestCheckHook
]
++ optional-dependencies.pydantic;
pythonImportsCheck = [ "ulid" ];
meta = {
description = "ULID implementation for Python";
mainProgram = "ulid";
homepage = "https://github.com/mdomke/python-ulid";
changelog = "https://github.com/mdomke/python-ulid/blob/${src.tag}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}