3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/moonraker/default.nix

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

54 lines
1.2 KiB
Nix
Raw Normal View History

2022-03-22 22:35:39 +00:00
{ lib, stdenvNoCC, fetchFromGitHub, python3, makeWrapper, unstableGitUpdater, nixosTests }:
2021-07-21 03:21:02 +01:00
let
pythonEnv = python3.withPackages (packages: with packages; [
tornado
pyserial-asyncio
2021-07-21 03:21:02 +01:00
pillow
lmdb
streaming-form-data
distro
inotify-simple
libnacl
paho-mqtt
pycurl
zeroconf
preprocess-cancellation
jinja2
dbus-next
apprise
2021-07-21 03:21:02 +01:00
]);
in stdenvNoCC.mkDerivation rec {
pname = "moonraker";
version = "unstable-2022-04-23";
2021-07-21 03:21:02 +01:00
src = fetchFromGitHub {
owner = "Arksine";
repo = "moonraker";
rev = "cd520ba91728abb5a3d959269fbd8e4f40d1eb0b";
sha256 = "sha256-sopX9t+LjYldx+syKwU3I0x/VYy4hLyXfitG0uumayE=";
2021-07-21 03:21:02 +01:00
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out $out/bin $out/lib
cp -r moonraker $out/lib
makeWrapper ${pythonEnv}/bin/python $out/bin/moonraker \
--add-flags "$out/lib/moonraker/moonraker.py"
'';
2022-03-22 22:35:39 +00:00
passthru = {
updateScript = unstableGitUpdater { url = meta.homepage; };
tests.moonraker = nixosTests.moonraker;
};
2021-07-21 03:21:02 +01:00
meta = with lib; {
description = "API web server for Klipper";
homepage = "https://github.com/Arksine/moonraker";
license = licenses.gpl3Only;
maintainers = with maintainers; [ zhaofengli ];
};
}