mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 17:23:08 +00:00
eb04659fc2
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{ lib, python3Packages, fetchFromGitHub, glib, wrapGAppsHook3 }:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "printrun";
|
|
version = "2.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kliment";
|
|
repo = "Printrun";
|
|
rev = "refs/tags/printrun-${version}";
|
|
hash = "sha256-GmTA/C45MuptN/Y0KjpFjaLV3sWoM4rHz8AMfV9sf4U=";
|
|
};
|
|
|
|
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 wrapGAppsHook3 ];
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
appdirs cython dbus-python numpy six wxpython psutil pyglet pyopengl pyserial cffi cairosvg lxml
|
|
];
|
|
|
|
# pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
|
|
doCheck = false;
|
|
|
|
setupPyBuildFlags = ["-i"];
|
|
|
|
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; {
|
|
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
|
|
homepage = "https://github.com/kliment/Printrun";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|