Files
nixpkgs/pkgs/by-name/pr/printrun/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
1.5 KiB
Nix

{
lib,
stdenv,
python3Packages,
fetchFromGitHub,
glib,
wrapGAppsHook3,
}:
python3Packages.buildPythonApplication rec {
pname = "printrun";
version = "2.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "kliment";
repo = "Printrun";
tag = "printrun-${version}";
hash = "sha256-INJNGAmghoPIiivQp6AV1XmhyIu8SjfKqL8PTpi/tkY=";
};
nativeBuildInputs = [
glib
wrapGAppsHook3
];
build-system = with python3Packages; [
setuptools
cython
];
dependencies =
with python3Packages;
[
pyserial
wxpython
numpy
pyglet
psutil
lxml
platformdirs
puremagic
]
++ lib.optional stdenv.hostPlatform.isLinux dbus-python
++ lib.optional stdenv.hostPlatform.isDarwin pyobjc-framework-Cocoa;
pythonRelaxDeps = [ "pyglet" ];
# pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
doCheck = false;
postInstall = ''
substituteInPlace $out/share/applications/*.desktop \
--replace-fail /usr/bin/ ""
substituteInPlace $out/share/applications/pronterface.desktop \
--replace-fail "Path=/usr/share/pronterface/" ""
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
homepage = "https://github.com/kliment/Printrun";
license = licenses.gpl3Plus;
changelog = "https://github.com/kliment/Printrun/releases/tag/${src.tag}";
};
}