mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-05 22:06:00 +03:00
Merge pull request #237404 from cab404/cab/moonraker-gpiod
moonraker: add useGpiod
This commit is contained in:
commit
6f7933059d
@ -1,8 +1,8 @@
|
||||
{ config, lib, options, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
pkg = pkgs.moonraker;
|
||||
cfg = config.services.moonraker;
|
||||
pkg = cfg.package;
|
||||
opt = options.services.moonraker;
|
||||
format = pkgs.formats.ini {
|
||||
# https://github.com/NixOS/nixpkgs/pull/121613#issuecomment-885241996
|
||||
@ -18,6 +18,14 @@ in {
|
||||
services.moonraker = {
|
||||
enable = mkEnableOption (lib.mdDoc "Moonraker, an API web server for Klipper");
|
||||
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.moonraker;
|
||||
defaultText = literalExpression "pkgs.moonraker";
|
||||
example = literalExpression "pkgs.moonraker.override { useGpiod = true; }";
|
||||
description = lib.mdDoc "Moonraker package to use";
|
||||
};
|
||||
|
||||
klipperSocket = mkOption {
|
||||
type = types.path;
|
||||
default = config.services.klipper.apiSocket;
|
||||
|
@ -1,23 +1,26 @@
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, python3, makeWrapper, unstableGitUpdater, nixosTests }:
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, python3, makeWrapper, unstableGitUpdater, nixosTests, useGpiod ? false }:
|
||||
|
||||
let
|
||||
pythonEnv = python3.withPackages (packages: with packages; [
|
||||
tornado
|
||||
pyserial-asyncio
|
||||
pillow
|
||||
lmdb
|
||||
streaming-form-data
|
||||
distro
|
||||
inotify-simple
|
||||
libnacl
|
||||
paho-mqtt
|
||||
pycurl
|
||||
zeroconf
|
||||
preprocess-cancellation
|
||||
jinja2
|
||||
dbus-next
|
||||
apprise
|
||||
]);
|
||||
pythonEnv = python3.withPackages (packages:
|
||||
with packages; [
|
||||
tornado
|
||||
pyserial-asyncio
|
||||
pillow
|
||||
lmdb
|
||||
streaming-form-data
|
||||
distro
|
||||
inotify-simple
|
||||
libnacl
|
||||
paho-mqtt
|
||||
pycurl
|
||||
zeroconf
|
||||
preprocess-cancellation
|
||||
jinja2
|
||||
dbus-next
|
||||
apprise
|
||||
]
|
||||
++ (lib.optionals useGpiod [ libgpiod ])
|
||||
);
|
||||
in stdenvNoCC.mkDerivation rec {
|
||||
pname = "moonraker";
|
||||
version = "unstable-2023-08-03";
|
||||
|
Loading…
Reference in New Issue
Block a user