Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / cpp-jwt / default.nix
blob7f55913b85bff3df8b895262728574d601efa8a5
1 { lib, stdenv, fetchFromGitHub, cmake, openssl, gtest, nlohmann_json }:
3 stdenv.mkDerivation rec {
4   pname = "cpp-jwt";
5   version = "1.4";
7   src = fetchFromGitHub {
8     owner = "arun11299";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-5hVsFanTCT/uLLXrnb2kMvmL6qs9RXVkvxdWaT6m4mk=";
12   };
14   # fix reported version
15   patches = [ ./fix-version.patch ];
17   cmakeFlags = [
18     "-DCPP_JWT_USE_VENDORED_NLOHMANN_JSON=OFF"
19     "-DCPP_JWT_BUILD_EXAMPLES=OFF"
20   ];
22   nativeBuildInputs = [ cmake gtest ];
24   buildInputs = [ openssl nlohmann_json ];
26   doCheck = true;
28   meta = {
29     description = "JSON Web Token library for C++";
30     homepage = "https://github.com/arun11299/cpp-jwt";
31     license = lib.licenses.mit;
32     maintainers = with lib.maintainers; [ fpletz ];
33   };