From 9050f3a37e0a6a5871adc364e3b601e9512ff518 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Tue, 20 Jul 2021 19:21:02 -0700 Subject: [PATCH] moonraker: init at unstable-2021-07-18 --- pkgs/servers/moonraker/default.nix | 44 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/servers/moonraker/default.nix diff --git a/pkgs/servers/moonraker/default.nix b/pkgs/servers/moonraker/default.nix new file mode 100644 index 000000000000..2ca35beeff11 --- /dev/null +++ b/pkgs/servers/moonraker/default.nix @@ -0,0 +1,44 @@ +{ 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-07-18"; + + src = fetchFromGitHub { + owner = "Arksine"; + repo = "moonraker"; + rev = "42f61ceafa90fcfea8bffbe968e26a6fd8b61af6"; + sha256 = "1w6l9pgs4n4nnk3h40y346bf6j3v4j4h1qnhj5dwlbwdxiqpd9gs"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f1d3b4c7453..4a87c3f9095d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3100,6 +3100,8 @@ in moodle-dl = callPackage ../tools/networking/moodle-dl { }; + moonraker = callPackage ../servers/moonraker { }; + mousetweaks = callPackage ../applications/accessibility/mousetweaks { inherit (pkgs.xorg) libX11 libXtst libXfixes; };