diff --git a/pkgs/development/python-modules/snakemake-storage-plugin-fs/default.nix b/pkgs/development/python-modules/snakemake-storage-plugin-fs/default.nix index 41c0f43edf22..96bcb3fc30fc 100644 --- a/pkgs/development/python-modules/snakemake-storage-plugin-fs/default.nix +++ b/pkgs/development/python-modules/snakemake-storage-plugin-fs/default.nix @@ -2,42 +2,59 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system poetry-core, - snakemake-interface-storage-plugins, + + # dependencies snakemake-interface-common, + snakemake-interface-storage-plugins, sysrsync, + + # tests + pytestCheckHook, + snakemake, + writableTmpDirAsHomeHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "snakemake-storage-plugin-fs"; version = "1.1.3"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "snakemake"; repo = "snakemake-storage-plugin-fs"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-UdK0yhl7ljLh57CXAvH/OYiVyw+BjhPwGjSBXX8sbZk="; }; - build-system = [ poetry-core ]; + build-system = [ + poetry-core + ]; dependencies = [ - snakemake-interface-storage-plugins snakemake-interface-common + snakemake-interface-storage-plugins sysrsync ]; - # The current tests are not worth dealing with cyclic dependency on snakemake - doCheck = false; + pythonImportsCheck = [ "snakemake_storage_plugin_fs" ]; - # Use nothing due to a cyclic dependency on snakemake - pythonImportsCheck = [ ]; + nativeCheckInputs = [ + pytestCheckHook + snakemake + writableTmpDirAsHomeHook + ]; + + enabledTestPaths = [ "tests/tests.py" ]; meta = { description = "Snakemake storage plugin that reads and writes from a locally mounted filesystem using rsync"; homepage = "https://github.com/snakemake/snakemake-storage-plugin-fs"; + changelog = "https://github.com/snakemake/snakemake-storage-plugin-fs/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ veprbl ]; }; -} +})