depot/third_party/nixpkgs/pkgs/development/python-modules/tweedledum/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

47 lines
1,018 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
cmake,
ninja,
scikit-build,
# Check Inputs
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "tweedledum";
version = "1.1.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "boschmitt";
repo = "tweedledum";
rev = "v${version}";
hash = "sha256-wgrY5ajaMYxznyNvlD0ul1PFr3W8oV9I/OVsStlZEBM=";
};
postPatch = ''
sed -i '/\[project\]/a version = "${version}"' pyproject.toml
sed -i '/\[project\]/a name = "tweedledum"' pyproject.toml
'';
nativeBuildInputs = [
cmake
ninja
scikit-build
];
dontUseCmakeConfigure = true;
pythonImportsCheck = [ "tweedledum" ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "python/test" ];
meta = with lib; {
description = "Library for synthesizing and manipulating quantum circuits";
homepage = "https://github.com/boschmitt/tweedledum";
license = licenses.mit;
maintainers = with maintainers; [ drewrisinger ];
};
}