nur-packages

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

package.nix (907B)


      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   __structuredAttrs = true;
     12 
     13   src = fetchFromGitHub {
     14     owner = "phoenix-mstu";
     15     repo = "janus-mqtt-proxy";
     16     rev = "bfdebffb6e277db00adf14d9a11f792cf418358a";
     17     hash = "sha256-RjhIV5GDHqtGz54Zfaph5JleBaAIDwIWGiknl1KNW+8=";
     18   };
     19 
     20   patches = [ ./go.mod.patch ];
     21 
     22   vendorHash = "sha256-dfllNAieT3scfsojOJoBSDpKJVkh9YwwRD9KvLwT2Jo=";
     23 
     24   subPackages = [ "cmd/proxy" ];
     25 
     26   postInstall = ''
     27     mv $out/bin/{proxy,janus-mqtt-proxy}
     28     install -Dm644 $src/sample_configs/*.yaml -t $out/share/janus-mqtt-proxy/sample_configs
     29   '';
     30 
     31   meta = {
     32     description = "MITM proxy which can filter and modify MQTT packets";
     33     homepage = "https://github.com/phoenix-mstu/janus-mqtt-proxy";
     34     license = lib.licenses.gpl3;
     35     maintainers = [ lib.maintainers.sikmir ];
     36   };
     37 }