diff --git a/pkgs/development/python-modules/nipreps-versions/default.nix b/pkgs/development/python-modules/nipreps-versions/default.nix index 163acc5cbfb2..8bfc005cabc2 100644 --- a/pkgs/development/python-modules/nipreps-versions/default.nix +++ b/pkgs/development/python-modules/nipreps-versions/default.nix @@ -2,39 +2,59 @@ lib, buildPythonPackage, fetchFromGitHub, - flit-scm, + + # build-system + hatch-vcs, + hatchling, + + # dependencies packaging, setuptools-scm, + vcs-versioning, + + # tests pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "nipreps-versions"; - version = "1.0.4"; + version = "1.2.0"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "nipreps"; repo = "version-schemes"; - tag = version; - hash = "sha256-B2wtLurzgk59kTooH51a2dewK7aEyA0dAm64Wp+tqhM="; + tag = finalAttrs.version; + hash = "sha256-SPJ4L68dFcSv1+Ytp3b3n+lr35Krq71fIlaReFux1nk="; }; - nativeBuildInputs = [ - flit-scm - setuptools-scm + build-system = [ + hatch-vcs + hatchling ]; - propagatedBuildInputs = [ packaging ]; + dependencies = [ + packaging + setuptools-scm + vcs-versioning + ]; nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "nipreps_versions" ]; + disabledTests = [ + # Rely on the current date, which is pinned to 1980 in the sandbox (`SOURCE_DATE_EPOCH`) + "invalid_branch_version" + "test_next_calver" + ]; + meta = { description = "Setuptools_scm plugin for nipreps version schemes"; homepage = "https://github.com/nipreps/version-schemes"; - changelog = "https://github.com/nipreps/version-schemes/blob/${src.rev}/CHANGES.md"; + changelog = "https://github.com/nipreps/version-schemes/blob/${finalAttrs.src.tag}/CHANGES.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ bcdarwin ]; }; -} +})