diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libcbor')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libcbor/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libcbor/default.nix b/nixpkgs/pkgs/development/libraries/libcbor/default.nix new file mode 100644 index 000000000000..ae5154eac034 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libcbor/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, cmake, cmocka }: + +stdenv.mkDerivation rec { + pname = "libcbor"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "PJK"; + repo = pname; + rev = "v${version}"; + sha256 = "01dv4vxcmbvpphqy16vqiwh25wx11x630js5wfnx7cryarsh9ld7"; + }; + + nativeBuildInputs = [ cmake ]; + checkInputs = [ cmocka ]; + + doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error + + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_SHARED_LIBS=on" ]; + + meta = with stdenv.lib; { + description = "CBOR protocol implementation for C and others"; + homepage = "https://github.com/PJK/libcbor"; + license = licenses.mit; + maintainers = with maintainers; [ dtzWill ]; + }; +} |