depot/third_party/nixpkgs/pkgs/servers/moonraker/default.nix
Default email 88abffb7d2 Project import generated by Copybara.
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
2021-09-18 12:52:07 +02:00

44 lines
1.1 KiB
Nix

{ 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
]);
in stdenvNoCC.mkDerivation rec {
pname = "moonraker";
version = "unstable-2021-09-04";
src = fetchFromGitHub {
owner = "Arksine";
repo = "moonraker";
rev = "db3f69e0dddcc8ac07e895a9a65906a8e08707e7";
sha256 = "uam3Vp/NA8HWxqqy6l8UkeaR5OSqHMwb5uXUL4E0jBQ=";
};
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 ];
};
}