depot/third_party/nixpkgs/pkgs/development/libraries/sexpp/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

49 lines
1.1 KiB
Nix

{ lib
, stdenv
, bzip2
, cmake
, fetchFromGitHub
, gtest
, pkg-config
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sexpp";
version = "0.8.8";
src = fetchFromGitHub {
owner = "rnpgp";
repo = "sexpp";
rev = "v${finalAttrs.version}";
hash = "sha256-6PCqzHAb5is8bArQWD5N+GykoWjM8H8mV0IabtNTlYg=";
};
buildInputs = [ zlib bzip2 ];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DBUILD_SHARED_LIBS=on"
"-DWITH_SEXP_TESTS=on"
"-DDOWNLOAD_GTEST=off"
"-DWITH_SEXP_CLI=on"
"-DWITH_SANITIZERS=off"
];
nativeBuildInputs = [ cmake gtest pkg-config ];
outputs = [ "out" "lib" "dev" ];
preConfigure = ''
echo "v${finalAttrs.version}" > version.txt
'';
meta = with lib; {
homepage = "https://github.com/rnpgp/sexp";
description = "S-expressions parser and generator C++ library, fully compliant to [https://people.csail.mit.edu/rivest/Sexp.txt]";
mainProgram = "sexpp";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ ribose-jeffreylau ];
};
})