From 1642e85877a5313ac732bae940893e53d56d8301 Mon Sep 17 00:00:00 2001 From: pandaman64 Date: Sat, 12 May 2018 16:02:57 +0900 Subject: [PATCH] qasm2image: init at 0.5.0 --- .../python-modules/qasm2image/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/qasm2image/default.nix diff --git a/pkgs/development/python-modules/qasm2image/default.nix b/pkgs/development/python-modules/qasm2image/default.nix new file mode 100644 index 000000000000..174e0871ca2f --- /dev/null +++ b/pkgs/development/python-modules/qasm2image/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cairocffi +, cairosvg +, cffi +, qiskit +, svgwrite +, colorama +, python +}: + +buildPythonPackage rec { + pname = "qasm2image"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "nelimeee"; + repo = "qasm2image"; + rev = "7f3c3e4d1701b8b284ef0352aa3a47722ebbbcaa"; + sha256 = "129xlpwp36h2czzw1wcl8df2864zg3if2gaad1v18ah1cf68b0f3"; + }; + + propagatedBuildInputs = [ + cairocffi + cairosvg + cffi + qiskit + svgwrite + ]; + + checkInputs = [ + colorama + ]; + checkPhase = '' + ${python.interpreter} tests/launch_tests.py + ''; + + meta = { + description = "A Python module to visualise quantum circuit"; + homepage = https://github.com/nelimeee/qasm2image; + license = lib.licenses.cecill-b; + maintainers = with lib.maintainers; [ + pandaman + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17f3b27ebf94..f4f189f72a21 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18205,6 +18205,8 @@ EOF IBMQuantumExperience = callPackage ../development/python-modules/ibmquantumexperience { }; qiskit = callPackage ../development/python-modules/qiskit { }; + + qasm2image = callPackage ../development/python-modules/qasm2image { }; }); in fix' (extends overrides packages)