2018-05-12 08:02:57 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cairocffi
|
|
|
|
, cairosvg
|
|
|
|
, cffi
|
|
|
|
, qiskit
|
|
|
|
, svgwrite
|
|
|
|
, colorama
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qasm2image";
|
2018-10-10 11:53:25 +01:00
|
|
|
version = "0.8.0";
|
2018-05-12 08:02:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-10-10 11:53:25 +01:00
|
|
|
owner = "nelimee";
|
2018-05-12 08:02:57 +01:00
|
|
|
repo = "qasm2image";
|
2018-10-10 11:53:25 +01:00
|
|
|
rev = "2c01756946ba9782973359dbd7bbf6651af6bee5";
|
|
|
|
sha256 = "1bnkzv7wrdvrq71dmsqanb3v2hcsxh5zaglfcxm2d9zzpmvb4a2n";
|
2018-05-12 08:02:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|