printrun: 2.0.0rc5 -> 2.0.0

This commit is contained in:
Weijia Wang 2023-03-19 13:59:55 +02:00
parent 2356c1ea75
commit e0766668c2

View File

@ -2,29 +2,33 @@
python3Packages.buildPythonApplication rec {
pname = "printrun";
version = "2.0.0rc5";
version = "2.0.0";
src = fetchFromGitHub {
owner = "kliment";
repo = "Printrun";
rev = "${pname}-${version}";
sha256 = "179x8lwrw2h7cxnkq7izny6qcb4nhjnd8zx893i77zfhzsa6kx81";
rev = "printrun-${version}";
hash = "sha256-ijJc0CVPiYW5VjTqhY1kO+Fy3dfuPoMn7KRhvcsdAZw=";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace "pyglet >= 1.1, < 2.0" "pyglet" \
--replace "cairosvg >= 1.0.9, < 2.6.0" "cairosvg"
sed -i -r "s|/usr(/local)?/share/|$out/share/|g" printrun/utils.py
'';
nativeBuildInputs = [ glib wrapGAppsHook ];
propagatedBuildInputs = with python3Packages; [
appdirs cython dbus-python numpy six wxPython_4_0 psutil pyglet pyopengl pyserial
appdirs cython dbus-python numpy six wxPython_4_2 psutil pyglet pyopengl pyserial cffi cairosvg lxml
];
# pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
doCheck = false;
setupPyBuildFlags = ["-i"];
postPatch = ''
sed -i -r "s|/usr(/local)?/share/|$out/share/|g" printrun/utils.py
'';
postInstall = ''
for f in $out/share/applications/*.desktop; do
sed -i -e "s|/usr/|$out/|g" "$f"
@ -40,7 +44,7 @@ python3Packages.buildPythonApplication rec {
meta = with lib; {
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
homepage = "https://github.com/kliment/Printrun";
license = licenses.gpl3;
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}