2021-04-13 19:44:15 +00:00
|
|
|
{ lib
|
2021-12-26 17:43:05 +00:00
|
|
|
, stdenv
|
2021-04-13 19:44:15 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, scikit-build
|
2021-12-06 16:07:01 +00:00
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
2021-04-13 19:44:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tweedledum";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.1.1";
|
2021-04-13 19:44:15 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub{
|
|
|
|
owner = "boschmitt";
|
|
|
|
repo = "tweedledum";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-wgrY5ajaMYxznyNvlD0ul1PFr3W8oV9I/OVsStlZEBM=";
|
2021-04-13 19:44:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja scikit-build ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "tweedledum" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pytestFlagsArray = [ "python/test" ];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A library for synthesizing and manipulating quantum circuits";
|
|
|
|
homepage = "https://github.com/boschmitt/tweedledum";
|
|
|
|
license = licenses.mit ;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|