mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
{ lib
|
|
, pythonOlder
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
# Python Inputs
|
|
, qiskit-aer
|
|
, qiskit-ibmq-provider
|
|
, qiskit-ignis
|
|
, qiskit-terra
|
|
# Optional inputs
|
|
, withOptionalPackages ? true
|
|
, qiskit-finance
|
|
, qiskit-machine-learning
|
|
, qiskit-nature
|
|
, qiskit-optimization
|
|
# Check Inputs
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
let
|
|
optionalQiskitPackages = [
|
|
qiskit-finance
|
|
qiskit-machine-learning
|
|
qiskit-nature
|
|
qiskit-optimization
|
|
];
|
|
in
|
|
buildPythonPackage rec {
|
|
pname = "qiskit";
|
|
# NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history
|
|
version = "0.39.4";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Qiskit";
|
|
repo = "qiskit";
|
|
rev = "refs/tags/${version}";
|
|
sha256 = "sha256-4Lf+0Dq64J53qTEzr9gtuYwe1a+zIgHmgoKMTBEef8M=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
qiskit-aer
|
|
qiskit-ibmq-provider
|
|
qiskit-ignis
|
|
qiskit-terra
|
|
] ++ lib.optionals withOptionalPackages optionalQiskitPackages;
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [
|
|
"qiskit"
|
|
"qiskit.circuit"
|
|
"qiskit.ignis"
|
|
"qiskit.providers.aer"
|
|
"qiskit.providers.ibmq"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Software for developing quantum computing programs";
|
|
homepage = "https://qiskit.org";
|
|
downloadPage = "https://github.com/QISKit/qiskit/releases";
|
|
changelog = "https://qiskit.org/documentation/release_notes.html";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ drewrisinger pandaman ];
|
|
};
|
|
}
|