diff --git a/pkgs/development/python-modules/affinegap/default.nix b/pkgs/development/python-modules/affinegap/default.nix new file mode 100644 index 000000000000..6d315b347729 --- /dev/null +++ b/pkgs/development/python-modules/affinegap/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + cython, + setuptools, + + # tests + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "affinegap"; + version = "1.12"; + pyproject = true; + + src = fetchFromGitHub { + owner = "dedupeio"; + repo = "affinegap"; + tag = "v${version}"; + hash = "sha256-9eX41eoME5Vdtq+c04eQbMYnViy6QKOhKkafrkeMylI="; + }; + + build-system = [ + cython + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # Prevent importing from source during test collection (only $out has compiled extensions) + preCheck = '' + rm -rf affinegap + ''; + + pythonImportsCheck = [ + "affinegap" + ]; + + meta = { + description = "Cython implementation of the affine gap string distance"; + homepage = "https://github.com/dedupeio/affinegap"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ daniel-fahey ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 99a8ce5fcd78..23224850d8a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -124,6 +124,8 @@ self: super: with self; { affine-gaps = callPackage ../development/python-modules/affine-gaps { }; + affinegap = callPackage ../development/python-modules/affinegap { }; + afsapi = callPackage ../development/python-modules/afsapi { }; agate = callPackage ../development/python-modules/agate { };