nur-packages

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

default.nix (986B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchfromgh,
      5   jre,
      6   makeWrapper,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "mqtt-cli";
     11   version = "4.34.0";
     12 
     13   src = fetchfromgh {
     14     owner = "hivemq";
     15     repo = "mqtt-cli";
     16     name = "mqtt-cli-${finalAttrs.version}.jar";
     17     hash = "sha256-1VORHAxIExsRp5jo+nrnlCqImVbCHPKq0Jwpll26eA8=";
     18     version = "v${finalAttrs.version}";
     19   };
     20 
     21   nativeBuildInputs = [ makeWrapper ];
     22 
     23   buildInputs = [ jre ];
     24 
     25   dontUnpack = true;
     26 
     27   installPhase = ''
     28     install -dm755 $out/bin
     29     install -Dm644 $src $out/share/java/${finalAttrs.src.name}
     30 
     31     makeWrapper ${jre}/bin/java $out/bin/mqtt-cli \
     32       --add-flags "-jar $out/share/java/mqtt-cli-${finalAttrs.version}.jar"
     33   '';
     34 
     35   meta = {
     36     description = "MQTT CLI";
     37     homepage = "https://hivemq.github.io/mqtt-cli/";
     38     sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
     39     license = lib.licenses.asl20;
     40     maintainers = [ lib.maintainers.sikmir ];
     41     platforms = jre.meta.platforms;
     42   };
     43 })