diff --git a/pkgs/by-name/sn/snakemake/package.nix b/pkgs/by-name/sn/snakemake/package.nix index 4f530aeb30c2..8b46b27e5fcb 100644 --- a/pkgs/by-name/sn/snakemake/package.nix +++ b/pkgs/by-name/sn/snakemake/package.nix @@ -1,21 +1,23 @@ { lib, stdenv, - fetchPypi, + fetchFromGitHub, python3Packages, stress, versionCheckHook, + writableTmpDirAsHomeHook, }: python3Packages.buildPythonApplication rec { pname = "snakemake"; - version = "8.23.0"; - + version = "8.29.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-XENI9VJW62KyrxDGSwQiygggYZOu9yW2QSNyp4BO9Us="; + src = fetchFromGitHub { + owner = "snakemake"; + repo = "snakemake"; + tag = "v${version}"; + hash = "sha256-vGa0N5jbm+b4FH1rkvZI5yI005K0D5AP29JGK2wscps="; }; postPatch = '' @@ -25,11 +27,11 @@ python3Packages.buildPythonApplication rec { --replace-fail 'del os.environ["PYTHONPATH"]' "pass" substituteInPlace snakemake/unit_tests/__init__.py \ --replace-fail '"unit_tests/templates"' '"'"$PWD"'/snakemake/unit_tests/templates"' + substituteInPlace snakemake/assets/__init__.py \ + --replace-fail "raise err" "return bytes('err','ascii')" ''; - build-system = with python3Packages; [ - setuptools - ]; + build-system = with python3Packages; [ setuptools ]; dependencies = with python3Packages; [ appdirs @@ -68,17 +70,21 @@ python3Packages.buildPythonApplication rec { # for the current basic test suite. Slurm, Tibanna and Tes require extra # setup. - nativeCheckInputs = with python3Packages; [ - numpy - pandas - pytestCheckHook - pytest-mock - requests-mock - snakemake-executor-plugin-cluster-generic - snakemake-storage-plugin-fs - stress - versionCheckHook - ]; + nativeCheckInputs = + (with python3Packages; [ + numpy + pandas + pytestCheckHook + pytest-mock + requests-mock + snakemake-executor-plugin-cluster-generic + snakemake-storage-plugin-fs + stress + versionCheckHook + polars + ]) + ++ [ writableTmpDirAsHomeHook ]; + versionCheckProgramArg = [ "--version" ]; pytestFlagsArray = [ @@ -140,13 +146,7 @@ python3Packages.buildPythonApplication rec { "test_scopes_submitted_to_cluster" ]; - pythonImportsCheck = [ - "snakemake" - ]; - - preCheck = '' - export HOME="$(mktemp -d)" - ''; + pythonImportsCheck = [ "snakemake" ]; meta = { homepage = "https://snakemake.github.io";