Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / qiskit-optimization / default.nix
blobf68149529e648139b1085d94883c4d76c1ec6fb5
1 { lib
2 , pythonOlder
3 , buildPythonPackage
4 , fetchFromGitHub
5   # Python Inputs
6 , decorator
7 , docplex
8 , networkx
9 , numpy
10 , qiskit-terra
11 , scipy
12   # Check Inputs
13 , pytestCheckHook
14 , ddt
15 , pylatexenc
16 , qiskit-aer
19 buildPythonPackage rec {
20   pname = "qiskit-optimization";
21   version = "0.5.0";
23   disabled = pythonOlder "3.6";
25   src = fetchFromGitHub {
26     owner = "qiskit";
27     repo = pname;
28     rev = "refs/tags/${version}";
29     hash = "sha256-N4mf5ins0x+yUAIq+yyjSnUrHcaEhH/Jpid/QMhIjE0=";
30   };
32   postPatch = ''
33     substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx"
34   '';
36   propagatedBuildInputs = [
37     docplex
38     decorator
39     networkx
40     numpy
41     qiskit-terra
42     scipy
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47     ddt
48     pylatexenc
49     qiskit-aer
50   ];
52   pythonImportsCheck = [ "qiskit_optimization" ];
53   pytestFlagsArray = [ "--durations=10" ];
55   meta = with lib; {
56     description = "Software for developing quantum computing programs";
57     homepage = "https://qiskit.org";
58     downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
59     changelog = "https://qiskit.org/documentation/release_notes.html";
60     license = licenses.asl20;
61     maintainers = with maintainers; [ drewrisinger ];
62   };