Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / sexpp / default.nix
blobdd41d520d28c1d1d7167660e4b3ec74f2443ab87
1 { lib
2 , stdenv
3 , bzip2
4 , cmake
5 , fetchFromGitHub
6 , gtest
7 , pkg-config
8 , zlib
9 }:
11 stdenv.mkDerivation (finalAttrs: {
12   pname = "sexpp";
13   version = "0.8.7";
15   src = fetchFromGitHub {
16     owner = "rnpgp";
17     repo = "sexpp";
18     rev = "v${finalAttrs.version}";
19     hash = "sha256-E1ESN3JKCWYBt1o37d7EVcgARnwGKS6mxua+0m1RMlM=";
20   };
22   buildInputs = [ zlib bzip2 ];
24   cmakeFlags = [
25     "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
26     "-DBUILD_SHARED_LIBS=on"
27     "-DWITH_SEXP_TESTS=on"
28     "-DDOWNLOAD_GTEST=off"
29     "-DWITH_SEXP_CLI=on"
30     "-DWITH_SANITIZERS=off"
31   ];
33   nativeBuildInputs = [ cmake gtest pkg-config ];
35   outputs = [ "out" "lib" "dev" ];
37   preConfigure = ''
38     echo "v${finalAttrs.version}" > version.txt
39   '';
41   meta = with lib; {
42     homepage = "https://github.com/rnpgp/sexp";
43     description = "S-expressions parser and generator C++ library, fully compliant to [https://people.csail.mit.edu/rivest/Sexp.txt]";
44     license = licenses.mit;
45     platforms = platforms.all;
46     maintainers = with maintainers; [ ribose-jeffreylau ];
47   };