Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 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 = [ cmake ninja scikit-build ]; 30 dontUseCmakeConfigure = true; 31 32 pythonImportsCheck = [ "tweedledum" ]; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 pytestFlagsArray = [ "python/test" ]; 36 37 meta = with lib; { 38 description = "A library for synthesizing and manipulating quantum circuits"; 39 homepage = "https://github.com/boschmitt/tweedledum"; 40 license = licenses.mit ; 41 maintainers = with maintainers; [ drewrisinger ]; 42 }; 43}