nur-packages

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

default.nix (878B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   buildGoModule,
      5 }:
      6 
      7 buildGoModule {
      8   pname = "janus-mqtt-proxy";
      9   version = "0-unstable-2022-02-19";
     10 
     11   src = fetchFromGitHub {
     12     owner = "phoenix-mstu";
     13     repo = "janus-mqtt-proxy";
     14     rev = "bfdebffb6e277db00adf14d9a11f792cf418358a";
     15     hash = "sha256-RjhIV5GDHqtGz54Zfaph5JleBaAIDwIWGiknl1KNW+8=";
     16   };
     17 
     18   patches = [ ./go.mod.patch ];
     19 
     20   vendorHash = "sha256-dfllNAieT3scfsojOJoBSDpKJVkh9YwwRD9KvLwT2Jo=";
     21 
     22   subPackages = [ "cmd/proxy" ];
     23 
     24   postInstall = ''
     25     mv $out/bin/{proxy,janus-mqtt-proxy}
     26     install -Dm644 $src/sample_configs/*.yaml -t $out/share/janus-mqtt-proxy/sample_configs
     27   '';
     28 
     29   meta = {
     30     description = "MITM proxy which can filter and modify MQTT packets";
     31     homepage = "https://github.com/phoenix-mstu/janus-mqtt-proxy";
     32     license = lib.licenses.gpl3;
     33     maintainers = [ lib.maintainers.sikmir ];
     34   };
     35 }