2021-07-21 03:21:02 +01:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub, python3, makeWrapper, unstableGitUpdater }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonEnv = python3.withPackages (packages: with packages; [
|
|
|
|
tornado
|
|
|
|
pyserial
|
|
|
|
pillow
|
|
|
|
lmdb
|
|
|
|
streaming-form-data
|
|
|
|
distro
|
|
|
|
inotify-simple
|
|
|
|
libnacl
|
|
|
|
paho-mqtt
|
2021-10-05 13:05:16 +01:00
|
|
|
pycurl
|
2021-07-21 03:21:02 +01:00
|
|
|
]);
|
|
|
|
in stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "moonraker";
|
2021-12-06 10:44:56 +00:00
|
|
|
version = "unstable-2021-12-05";
|
2021-07-21 03:21:02 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Arksine";
|
|
|
|
repo = "moonraker";
|
2021-12-06 10:44:56 +00:00
|
|
|
rev = "ac73036857cc1ca83df072dd94bf28eb9d0ed8b0";
|
|
|
|
sha256 = "Oqjt0z4grt+hdQ4t7KQSwkkCeRGoFFedJsTpMHwMm34=";
|
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"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = unstableGitUpdater { url = meta.homepage; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "API web server for Klipper";
|
|
|
|
homepage = "https://github.com/Arksine/moonraker";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ zhaofengli ];
|
|
|
|
};
|
|
|
|
}
|