diff --git a/pkgs/development/python-modules/tweedledum/default.nix b/pkgs/development/python-modules/tweedledum/default.nix new file mode 100644 index 000000000000..4b24b3ff4efa --- /dev/null +++ b/pkgs/development/python-modules/tweedledum/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cmake +, ninja +, scikit-build +}: + +buildPythonPackage rec { + pname = "tweedledum"; + version = "1.0.0"; + format = "pyproject"; + + src = fetchFromGitHub{ + owner = "boschmitt"; + repo = "tweedledum"; + rev = "v${version}"; + hash = "sha256-59lJzdw9HLJ9ADxp/a3KW4v5aU/dYm27NSYoz9D49i4="; + }; + + nativeBuildInputs = [ cmake ninja scikit-build ]; + dontUseCmakeConfigure = true; + + pythonImportsCheck = [ "tweedledum" ]; + + # TODO: use pytest, but had issues with finding the correct directories + checkPhase = '' + python -m unittest discover -s ./python/test -t . + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ebbe6b5210e..0c556e00afcd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8565,6 +8565,8 @@ in { tvnamer = callPackage ../development/python-modules/tvnamer { }; + tweedledum = callPackage ../development/python-modules/tweedledum { }; + tweepy = callPackage ../development/python-modules/tweepy { }; twentemilieu = callPackage ../development/python-modules/twentemilieu { };