nixpkgs/pkgs/by-name/kl/klipperscreen/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

56 lines
1.2 KiB
Nix

{ lib
, python3
, fetchFromGitHub
, wrapGAppsHook3
, gobject-introspection
, gitUpdater
}: python3.pkgs.buildPythonApplication rec {
pname = "KlipperScreen";
version = "0.4.4";
format = "other";
src = fetchFromGitHub {
owner = "KlipperScreen";
repo = "KlipperScreen";
rev = "v${version}";
hash = "sha256-MxuUmkuEnfFC0iPwNUc0Wh8bIEl1J1FMgGEYMjHePZ8=";
};
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook3
];
pythonPath = with python3.pkgs; [
jinja2
netifaces
requests
websocket-client
pycairo
pygobject3
mpv
six
dbus-python
];
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
'';
passthru.updateScript = gitUpdater { url = meta.homepage; };
meta = with lib; {
description = "Touchscreen GUI for the Klipper 3D printer firmware";
homepage = "https://github.com/jordanruthe/KlipperScreen";
license = licenses.agpl3Only;
maintainers = with maintainers; [ cab404 saturn745 ];
mainProgram = "KlipperScreen";
};
}