Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / primer3 / default.nix
blob78d43a08b4acd60f8a34810572ffb3cfb71d81c7
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , cython
6 , gcc
7 , click
8 , pytestCheckHook
9 , pythonOlder
10 , setuptools
13 buildPythonPackage rec {
14   pname = "primer3";
15   version = "2.0.3";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "libnano";
22     repo = "primer3-py";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-O8BFjkjG9SfknSrK34s9EJnqTrtCf4zW9A+N+/MHl2w=";
25   };
27   nativeBuildInputs = [
28     cython
29     setuptools
30   ] ++ lib.optionals stdenv.isDarwin [
31     gcc
32   ];
34   nativeCheckInputs = [
35     click
36     pytestCheckHook
37   ];
38   # We are not sure why exactly this is need. It seems `pytestCheckHook`
39   # doesn't find extension modules installed in $out/${python.sitePackages},
40   # and the tests rely upon them. This was initially reported upstream at
41   # https://github.com/libnano/primer3-py/issues/120 and we investigate this
42   # downstream at: https://github.com/NixOS/nixpkgs/issues/255262.
43   preCheck = ''
44     python setup.py build_ext --inplace
45   '';
47   pythonImportsCheck = [
48     "primer3"
49   ];
51   meta = with lib; {
52     description = "Oligo analysis and primer design";
53     homepage = "https://github.com/libnano/primer3-py";
54     changelog = "https://github.com/libnano/primer3-py/blob/v${version}/CHANGES";
55     license = with licenses; [ gpl2Only ];
56     maintainers = with maintainers; [ fab ];
57   };