nixpkgs/pkgs/applications/misc/printrun/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, python3Packages, fetchFromGitHub, glib, wrapGAppsHook }:
2014-03-29 22:03:35 +00:00
2020-06-14 01:25:11 +00:00
python3Packages.buildPythonApplication rec {
2020-12-30 17:51:10 +00:00
pname = "printrun";
2023-03-19 11:59:55 +00:00
version = "2.0.0";
2015-10-27 10:23:12 +00:00
src = fetchFromGitHub {
owner = "kliment";
repo = "Printrun";
2023-03-19 11:59:55 +00:00
rev = "printrun-${version}";
hash = "sha256-ijJc0CVPiYW5VjTqhY1kO+Fy3dfuPoMn7KRhvcsdAZw=";
2014-03-29 22:03:35 +00:00
};
2023-03-19 11:59:55 +00:00
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 ];
2020-06-14 01:25:11 +00:00
propagatedBuildInputs = with python3Packages; [
2023-03-19 11:59:55 +00:00
appdirs cython dbus-python numpy six wxPython_4_2 psutil pyglet pyopengl pyserial cffi cairosvg lxml
2015-10-27 10:23:12 +00:00
];
2014-03-29 22:03:35 +00:00
2023-03-19 11:59:55 +00:00
# pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
2014-03-29 22:03:35 +00:00
doCheck = false;
setupPyBuildFlags = ["-i"];
2014-03-29 22:03:35 +00:00
postInstall = ''
for f in $out/share/applications/*.desktop; do
sed -i -e "s|/usr/|$out/|g" "$f"
done
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
2014-03-29 22:03:35 +00:00
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
homepage = "https://github.com/kliment/Printrun";
2023-03-19 11:59:55 +00:00
license = licenses.gpl3Plus;
2014-03-29 22:03:35 +00:00
platforms = platforms.linux;
};
}