Skip to content

Commit

Permalink
rnp: 0.16.3 -> 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ribose-jeffreylau committed Jun 28, 2023
1 parent ef9a2bf commit 5d3819e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pkgs/tools/security/rnp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@
, json_c
, pkg-config
, python3
, sexp
, zlib
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "rnp";
version = "0.16.3";
version = "0.17.0";

src = fetchFromGitHub {
owner = "rnpgp";
repo = "rnp";
rev = "v${version}";
sha256 = "sha256-kM3gBc5rbLJU7UXvWz4a9c+Ahi/d0z8R9S5t0B9Fts0=";
rev = "v${finalAttrs.version}";
hash = "sha256-4fB7Sl9+ATrJTRnhbNG5BoW3XLxR7IP167RK96+gxj0=";
};

buildInputs = [ zlib bzip2 json_c botan2 ];
buildInputs = [ zlib bzip2 json_c botan2 sexp ];

patches = [ ./unbundle-sexp.patch ];

cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
Expand All @@ -43,7 +46,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" ];

preConfigure = ''
echo "v${version}" > version.txt
echo "v${finalAttrs.version}" > version.txt
'';

meta = with lib; {
Expand All @@ -53,4 +56,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
maintainers = with maintainers; [ ribose-jeffreylau ];
};
}
})
38 changes: 38 additions & 0 deletions pkgs/tools/security/rnp/unbundle-sexp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index bb6d40cb..30171e7c 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -176,11 +176,6 @@ if (ENABLE_FUZZERS)
endif()
add_subdirectory(src/common)

-set(WITH_SEXP_CLI OFF)
-set(WITH_SEXP_TESTS OFF)
-set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME development)
-add_subdirectory(src/libsexp EXCLUDE_FROM_ALL)
-
add_subdirectory(src/lib)
add_subdirectory(src/rnp)
add_subdirectory(src/rnpkeys)
diff --git i/src/lib/CMakeLists.txt w/src/lib/CMakeLists.txt
index 086ac57d..b219ef06 100755
--- i/src/lib/CMakeLists.txt
+++ w/src/lib/CMakeLists.txt
@@ -433,7 +433,7 @@ install(TARGETS librnp
COMPONENT development
)

- install(TARGETS librnp-static sexp
+ install(TARGETS librnp-static
EXPORT rnp-targets
ARCHIVE
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
@@ -441,7 +441,7 @@ install(TARGETS librnp
)
else(BUILD_SHARED_LIBS)
# static libraries only
-install(TARGETS librnp sexp
+install(TARGETS librnp
EXPORT rnp-targets
ARCHIVE
DESTINATION "${CMAKE_INSTALL_LIBDIR}"

0 comments on commit 5d3819e

Please sign in to comment.