at master 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cmake, 6 ninja, 7 scikit-build, 8 # Check Inputs 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "tweedledum"; 14 version = "1.1.1"; 15 format = "pyproject"; 16 17 src = fetchFromGitHub { 18 owner = "boschmitt"; 19 repo = "tweedledum"; 20 rev = "v${version}"; 21 hash = "sha256-wgrY5ajaMYxznyNvlD0ul1PFr3W8oV9I/OVsStlZEBM="; 22 }; 23 24 postPatch = '' 25 sed -i '/\[project\]/a version = "${version}"' pyproject.toml 26 sed -i '/\[project\]/a name = "tweedledum"' pyproject.toml 27 ''; 28 29 nativeBuildInputs = [ 30 cmake 31 ninja 32 scikit-build 33 ]; 34 dontUseCmakeConfigure = true; 35 36 pythonImportsCheck = [ "tweedledum" ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 enabledTestPaths = [ "python/test" ]; 40 41 meta = with lib; { 42 description = "Library for synthesizing and manipulating quantum circuits"; 43 homepage = "https://github.com/boschmitt/tweedledum"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ drewrisinger ]; 46 }; 47}