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

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

56 lines
1.2 KiB
Nix
Raw Normal View History

2023-05-17 06:03:31 +00:00
{ lib
, python3
, fetchFromGitHub
, wrapGAppsHook
, gobject-introspection
, gitUpdater
}: python3.pkgs.buildPythonApplication rec {
2023-04-21 04:09:17 +00:00
pname = "KlipperScreen";
version = "0.3.2";
2023-05-17 06:03:31 +00:00
format = "other";
2023-04-21 04:09:17 +00:00
src = fetchFromGitHub {
owner = "jordanruthe";
2023-05-17 06:03:31 +00:00
repo = "KlipperScreen";
2023-04-21 04:09:17 +00:00
rev = "v${version}";
hash = "sha256-LweO5EVWr3OxziHrjtQDdWyUBCVUJ17afkw7RCZWgcg=";
};
2023-05-17 06:03:31 +00:00
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook
];
2023-04-21 04:09:17 +00:00
2023-05-17 06:03:31 +00:00
pythonPath = with python3.pkgs; [
jinja2
netifaces
requests
websocket-client
pycairo
pygobject3
mpv
six
dbus-python
];
2023-04-21 04:09:17 +00:00
2023-05-17 06:03:31 +00:00
dontWrapGApps = true;
preFixup = ''
mkdir -p $out/bin
cp -r . $out/dist
gappsWrapperArgs+=(--set PYTHONPATH "$PYTHONPATH")
wrapGApp $out/dist/screen.py
ln -s $out/dist/screen.py $out/bin/KlipperScreen
2023-04-21 04:09:17 +00:00
'';
2023-05-17 06:03:31 +00:00
passthru.updateScript = gitUpdater { url = meta.homepage; };
2023-04-21 04:09:17 +00:00
meta = with lib; {
description = "Touchscreen GUI for the Klipper 3D printer firmware";
2023-05-17 06:03:31 +00:00
homepage = "https://github.com/jordanruthe/KlipperScreen";
2023-04-21 04:09:17 +00:00
license = licenses.agpl3;
2023-05-17 06:03:31 +00:00
maintainers = with maintainers; [ cab404 ];
2024-02-11 02:19:15 +00:00
mainProgram = "KlipperScreen";
2023-04-21 04:09:17 +00:00
};
}