2018-05-12 08:02:57 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cairocffi
|
|
|
|
, cairosvg
|
|
|
|
, cffi
|
|
|
|
, qiskit
|
|
|
|
, svgwrite
|
|
|
|
, colorama
|
|
|
|
, python
|
2019-03-09 14:20:48 +00:00
|
|
|
, pythonOlder
|
2018-05-12 08:02:57 +01:00
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildPythonPackage {
|
2018-05-12 08:02:57 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2019-03-09 14:20:48 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2018-05-12 08:02:57 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairocffi
|
|
|
|
cairosvg
|
|
|
|
cffi
|
|
|
|
qiskit
|
|
|
|
svgwrite
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
colorama
|
|
|
|
];
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} tests/launch_tests.py
|
|
|
|
'';
|
|
|
|
|
2018-12-05 03:23:34 +00:00
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
2018-05-12 08:02:57 +01:00
|
|
|
meta = {
|
|
|
|
description = "A Python module to visualise quantum circuit";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/nelimeee/qasm2image";
|
2018-05-12 08:02:57 +01:00
|
|
|
license = lib.licenses.cecill-b;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
pandaman
|
|
|
|
];
|
2020-07-01 17:39:25 +01:00
|
|
|
broken = true; # last update Oct 2018, failed tests don't error the build, and out-of-date with latest python3Packages.qiskit
|
2018-05-12 08:02:57 +01:00
|
|
|
};
|
|
|
|
}
|