nur-packages

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

default.nix (878B)


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