base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / se / sexpp / package.nix
blob1da355e2b59582bbf7b10d6880641772ca9bf0b6
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.9.0";
15   src = fetchFromGitHub {
16     owner = "rnpgp";
17     repo = "sexpp";
18     rev = "v${finalAttrs.version}";
19     hash = "sha256-mNt6J8nhzT5sF28ktl3jOkQMKn6x9iE04MMrwwVxyZs=";
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     mainProgram = "sexpp";
45     license = licenses.mit;
46     platforms = platforms.all;
47     maintainers = with maintainers; [ ribose-jeffreylau ];
48   };