nixpkgs/pkgs/development/python-modules/snakemake-interface-common/default.nix
Gaetan Lepage 90d358c2c5 python3Packages.snakemake-interface-common: cleanup
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 10:10:05 +00:00

75 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
# build-system
setuptools,
# dependencies
argparse-dataclass,
configargparse,
# tests
pytestCheckHook,
snakemake,
# passthru
snakemake-interface-common,
}:
buildPythonPackage (finalAttrs: {
pname = "snakemake-interface-common";
version = "1.23.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "snakemake";
repo = "snakemake-interface-common";
tag = "v${finalAttrs.version}";
hash = "sha256-D3vktJmn1CifdiEg5UPGpBuuigEIb+ja4yklHZA6ytQ=";
};
patches = [
# Upstream PR: https://github.com/snakemake/snakemake-interface-common/pull/89
(fetchpatch {
name = "relax-packaging-dependency.patch";
url = "https://github.com/snakemake/snakemake-interface-common/commit/d585b5c0c7c0ec0df60a1a26d5d413f3ee88e63f.patch";
hash = "sha256-mZ03mx7W5XpdNzr1aNVyQm7/hPdD7yuYqk7DCR9y7Fw=";
})
];
build-system = [
setuptools
];
dependencies = [
argparse-dataclass
configargparse
];
pythonImportsCheck = [ "snakemake_interface_common" ];
nativeCheckInputs = [
pytestCheckHook
snakemake
];
enabledTestPaths = [ "tests/tests.py" ];
# Circular dependency with snakemake
doCheck = false;
passthru.tests.pytest = snakemake-interface-common.overridePythonAttrs {
doCheck = true;
};
meta = {
description = "Common functions and classes for Snakemake and its plugins";
homepage = "https://github.com/snakemake/snakemake-interface-common";
changelog = "https://github.com/snakemake/snakemake-interface-common/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ veprbl ];
};
})