summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-06-28 14:12:52 +0200
committerGitHub <noreply@github.com>2023-06-28 14:12:52 +0200
commitebc78bce368b3ee91d06db37dcf8fedc709577a6 (patch)
tree5bbe126e16ff6dc30bbf7aa284be172ad7130f04
parentMerge pull request #228448 from andersk/22.11-openafs-kernel-6.3 (diff)
downloadnixpkgs-ebc78bce368b3ee91d06db37dcf8fedc709577a6.tar.gz
sexp: init at 0.8.6 (#240252)
This is a dependency of the [next version](https://github.com/rnpgp/rnp/releases/tag/v0.17.0) of [rnp](https://github.com/NixOS/nixpkgs/blob/a04b45f10eddb02352574d95c7d0a76bfbfc11dc/pkgs/tools/security/rnp/default.nix#L17). (cherry picked from commit d8c6a48180ef9ad587149eac65e554cf773b302b) Co-authored-by: Jeffrey Lau <jeffrey.lau@ribose.com>
-rw-r--r--pkgs/development/libraries/sexp/default.nix48
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/libraries/sexp/default.nix b/pkgs/development/libraries/sexp/default.nix
new file mode 100644
index 000000000000..9f9eb1f8973c
--- /dev/null
+++ b/pkgs/development/libraries/sexp/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, bzip2
+, cmake
+, fetchFromGitHub
+, gtest
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "sexp";
+ version = "0.8.6";
+
+ src = fetchFromGitHub {
+ owner = "rnpgp";
+ repo = "sexp";
+ rev = "v${finalAttrs.version}";
+ hash = "sha256-NpDSoBxEM8g/SugLmT8E5+YZPDFIGHa4eXLjdzQxaiw=";
+ };
+
+ 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]";
+ license = licenses.mit;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ ribose-jeffreylau ];
+ };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 685f198628d9..f85645105162 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11337,6 +11337,8 @@ with pkgs;
sewer = callPackage ../tools/admin/sewer { };
+ sexp = callPackage ../development/libraries/sexp { };
+
sfeed = callPackage ../tools/misc/sfeed { };
sftpman = callPackage ../tools/filesystems/sftpman { };