nur-packages

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

default.nix (813B)


      1 { lib, stdenv, fetchFromGitHub, cmake, libcpr, boost, catch2, trompeloeil }:
      2 
      3 stdenv.mkDerivation (finalAttrs: {
      4   pname = "influxdb-cxx";
      5   version = "0.7.0";
      6 
      7   src = fetchFromGitHub {
      8     owner = "offa";
      9     repo = "influxdb-cxx";
     10     rev = "v${finalAttrs.version}";
     11     hash = "sha256-ALv6RnWcvonNfoFJfbjVyUdPZ3FWBavGXhvppr5UdWM=";
     12   };
     13 
     14   nativeBuildInputs = [ cmake ];
     15 
     16   buildInputs = [ libcpr boost ]
     17     ++ lib.optionals finalAttrs.doCheck [ catch2 trompeloeil ];
     18 
     19   cmakeFlags = [
     20     "-DINFLUXCXX_TESTING=${if finalAttrs.doCheck then "ON" else "OFF"}"
     21   ];
     22 
     23   doCheck = false;
     24 
     25   meta = with lib; {
     26     description = "InfluxDB C++ client library";
     27     inherit (finalAttrs.src.meta) homepage;
     28     license = licenses.mit;
     29     maintainers = [ maintainers.sikmir ];
     30     platforms = platforms.unix;
     31   };
     32 })