nur-packages

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

default.nix (1003B)


      1 { lib, stdenv, fetchFromGitHub, cmake, libev, lua, openssl, zlib }:
      2 
      3 stdenv.mkDerivation (finalAttrs: {
      4   pname = "libumqtt";
      5   version = "1.1.1";
      6 
      7   src = fetchFromGitHub {
      8     owner = "zhaojh329";
      9     repo = "libumqtt";
     10     rev = "v${finalAttrs.version}";
     11     hash = "sha256-rNKcGU0LcTnSaVJjkI3onSpgJUY1apHaoFyx8GmyO8Y=";
     12     fetchSubmodules = true;
     13   };
     14 
     15   postPatch = lib.optionalString stdenv.isDarwin ''
     16     substituteInPlace src/buffer/buffer.h \
     17       --replace-fail "<endian.h>" "<machine/endian.h>"
     18   '';
     19 
     20   nativeBuildInputs = [ cmake ];
     21 
     22   buildInputs = [ libev lua openssl zlib ];
     23 
     24   env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration -Wno-error=misleading-indentation";
     25 
     26   meta = with lib; {
     27     description = "A Lightweight and fully asynchronous MQTT client C library based on libev";
     28     inherit (finalAttrs.src.meta) homepage;
     29     license = licenses.mit;
     30     maintainers = [ maintainers.sikmir ];
     31     platforms = platforms.linux;
     32     skip.ci = stdenv.isDarwin;
     33   };
     34 })