nur-packages

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

default.nix (1473B)


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