nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

package.nix (1588B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   python312Packages,
      6   replaceVars,
      7 }:
      8 
      9 let
     10   python3Packages = python312Packages;
     11 in
     12 python3Packages.buildPythonApplication rec {
     13   pname = "mqttwarn";
     14   version = "0.35.0";
     15   pyproject = true;
     16 
     17   src = fetchFromGitHub {
     18     owner = "mqtt-tools";
     19     repo = "mqttwarn";
     20     tag = version;
     21     hash =
     22       if stdenv.hostPlatform.isDarwin then
     23         "sha256-jdQNCmfGs1k52VKzcF132mmUSWkcdcsjx+AHxM+MRdw="
     24       else
     25         "sha256-lr1cJvfQtkSc/DQc0fagAn5LQBgfVIwlUfxdbogcofM=";
     26   };
     27 
     28   patches = [
     29     (replaceVars ./version.patch {
     30       inherit version;
     31     })
     32   ];
     33 
     34   build-system = with python3Packages; [
     35     setuptools
     36     versioningit
     37   ];
     38 
     39   dependencies = with python3Packages; [
     40     attrs
     41     docopt
     42     funcy
     43     future
     44     jinja2
     45     paho-mqtt
     46     requests
     47     six
     48   ];
     49 
     50   pythonRelaxDeps = true;
     51 
     52   optional-dependencies = with python3Packages; {
     53     apprise = [ apprise ];
     54     celery = [ celery ];
     55     chromecast = [ pychromecast ];
     56     dnsupdate = [ dnspython ];
     57     serial = [ pyserial ];
     58     ssh = [ paramiko ];
     59     tootpaste = [ mastodon-py ];
     60     websocket = [ websocket-client ];
     61   };
     62 
     63   doCheck = false;
     64 
     65   nativeCheckInputs = [
     66     python3Packages.pytestCheckHook
     67   ]
     68   ++ lib.flatten (lib.attrValues optional-dependencies);
     69 
     70   meta = {
     71     description = "A highly configurable MQTT message router, where the routing targets are notification plugins";
     72     homepage = "https://guthub.com/mqtt-tools/mqttwarn";
     73     license = lib.licenses.epl20;
     74     maintainers = [ lib.maintainers.sikmir ];
     75     mainProgram = "mqttwarn";
     76   };
     77 }