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

49 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, python3Packages, fetchFromGitHub, glib, wrapGAppsHook }:
2014-03-29 23:03:35 +01:00
2020-06-14 03:25:11 +02:00
python3Packages.buildPythonApplication rec {
2020-12-30 18:51:10 +01:00
pname = "printrun";
2020-06-14 03:25:11 +02:00
version = "2.0.0rc5";
2015-10-27 11:23:12 +01:00
src = fetchFromGitHub {
owner = "kliment";
repo = "Printrun";
2020-12-30 18:51:10 +01:00
rev = "${pname}-${version}";
2020-06-14 03:25:11 +02:00
sha256 = "179x8lwrw2h7cxnkq7izny6qcb4nhjnd8zx893i77zfhzsa6kx81";
2014-03-29 23:03:35 +01:00
};
nativeBuildInputs = [ glib wrapGAppsHook ];
2020-06-14 03:25:11 +02:00
propagatedBuildInputs = with python3Packages; [
appdirs cython dbus-python numpy six wxPython_4_0 psutil pyglet pyopengl pyserial
2015-10-27 11:23:12 +01:00
];
2014-03-29 23:03:35 +01:00
doCheck = false;
setupPyBuildFlags = ["-i"];
2014-03-29 23:03:35 +01:00
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"
done
'';
dontWrapGApps = true;
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
2014-03-29 23:03:35 +01:00
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
homepage = "https://github.com/kliment/Printrun";
2014-03-29 23:03:35 +01:00
license = licenses.gpl3;
platforms = platforms.linux;
};
}