nur-packages

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

default.nix (907B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5 }:
      6 
      7 python3Packages.buildPythonApplication rec {
      8   pname = "mqtt-to-influxdb-forwarder";
      9   version = "2.1.0";
     10   format = "other";
     11 
     12   src = fetchFromGitHub {
     13     owner = "mhaas";
     14     repo = "mqtt-to-influxdb-forwarder";
     15     rev = "v${version}";
     16     hash = "sha256-2n5YF5aLaUzHmxgPhnRXXyhoXV0nJ21aa7g+NBTYvBk=";
     17   };
     18 
     19   postPatch = ''
     20     substituteInPlace forwarder.py --replace-fail "ur'" "r'"
     21   '';
     22 
     23   dontUseSetuptoolsBuild = true;
     24   dontUseSetuptoolsCheck = true;
     25 
     26   dependencies = with python3Packages; [
     27     paho-mqtt
     28     influxdb
     29   ];
     30 
     31   installPhase = ''
     32     install -Dm755 forwarder.py $out/bin/mqtt-to-influxdb-forwarder
     33   '';
     34 
     35   meta = {
     36     description = "IoT MQTT to InfluxDB forwarder";
     37     homepage = "https://github.com/mhaas/mqtt-to-influxdb-forwarder";
     38     license = lib.licenses.gpl3Plus;
     39     maintainers = [ lib.maintainers.sikmir ];
     40   };
     41 }