diff --git a/pkgs/tools/security/rnp/default.nix b/pkgs/tools/security/rnp/default.nix index af59729f6f22..b0a7a0f166f5 100644 --- a/pkgs/tools/security/rnp/default.nix +++ b/pkgs/tools/security/rnp/default.nix @@ -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"}" @@ -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; { @@ -53,4 +56,4 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ ribose-jeffreylau ]; }; -} +}) diff --git a/pkgs/tools/security/rnp/unbundle-sexp.patch b/pkgs/tools/security/rnp/unbundle-sexp.patch new file mode 100644 index 000000000000..dcbf92948a28 --- /dev/null +++ b/pkgs/tools/security/rnp/unbundle-sexp.patch @@ -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}"