summary refs log tree commit diff
path: root/pkgs/development/python-modules/qasm2image
diff options
context:
space:
mode:
authorpandaman64 <kointosudesuyo@infoseek.jp>2018-05-12 16:02:57 +0900
committerpandaman64 <kointosudesuyo@infoseek.jp>2018-06-14 11:43:09 +0900
commit1642e85877a5313ac732bae940893e53d56d8301 (patch)
treeb907920b97e815ec29f151ca5b5ee49504a089e4 /pkgs/development/python-modules/qasm2image
parent1aed57c2225d8177118d236d828f9037965d98de (diff)
downloadnixlib-1642e85877a5313ac732bae940893e53d56d8301.tar
nixlib-1642e85877a5313ac732bae940893e53d56d8301.tar.gz
nixlib-1642e85877a5313ac732bae940893e53d56d8301.tar.bz2
nixlib-1642e85877a5313ac732bae940893e53d56d8301.tar.lz
nixlib-1642e85877a5313ac732bae940893e53d56d8301.tar.xz
nixlib-1642e85877a5313ac732bae940893e53d56d8301.tar.zst
nixlib-1642e85877a5313ac732bae940893e53d56d8301.zip
qasm2image: init at 0.5.0
Diffstat (limited to 'pkgs/development/python-modules/qasm2image')
-rw-r--r--pkgs/development/python-modules/qasm2image/default.nix47
1 files changed, 47 insertions, 0 deletions
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
+    ];
+  };
+}