Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 openssl, 7 gtest, 8 nlohmann_json, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "cpp-jwt"; 13 version = "1.5"; 14 15 src = fetchFromGitHub { 16 owner = "arun11299"; 17 repo = "cpp-jwt"; 18 rev = "v${version}"; 19 sha256 = "sha256-l1FevNhGX7vouKmGh/ypCcmZQLMpHJ4JFUp5dnNMEwg="; 20 }; 21 22 cmakeFlags = [ 23 "-DCPP_JWT_USE_VENDORED_NLOHMANN_JSON=OFF" 24 "-DCPP_JWT_BUILD_EXAMPLES=OFF" 25 ]; 26 27 nativeBuildInputs = [ cmake ]; 28 29 buildInputs = [ 30 gtest 31 openssl 32 nlohmann_json 33 ]; 34 35 doCheck = true; 36 37 strictDeps = true; 38 39 meta = { 40 description = "JSON Web Token library for C++"; 41 homepage = "https://github.com/arun11299/cpp-jwt"; 42 license = lib.licenses.mit; 43 maintainers = with lib.maintainers; [ fpletz ]; 44 }; 45}