diff options
author | Jeffrey Lau <jeffrey.lau@ribose.com> | 2021-02-24 19:02:23 +0800 |
---|---|---|
committer | Jeffrey Lau <jeffrey.lau@ribose.com> | 2021-06-07 13:07:11 +0800 |
commit | bb2d32cab8ede34394774e9af6972970744c26cc (patch) | |
tree | b5f1283a0d747e5c53e8426cf84ad669e49b5922 /pkgs/tools/security/rnp | |
parent | 4871a550bf5dcb25bde07f621c44bdf5d101d574 (diff) |
rnp: init at 0.15.1
Diffstat (limited to 'pkgs/tools/security/rnp')
-rw-r--r-- | pkgs/tools/security/rnp/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/security/rnp/default.nix b/pkgs/tools/security/rnp/default.nix new file mode 100644 index 0000000000000..3c60190f12870 --- /dev/null +++ b/pkgs/tools/security/rnp/default.nix @@ -0,0 +1,56 @@ +{ lib +, stdenv +, asciidoctor +, botan2 +, bzip2 +, cmake +, fetchFromGitHub +, gnupg +, gtest +, json_c +, pkg-config +, python3 +, zlib +}: + +stdenv.mkDerivation rec { + pname = "rnp"; + version = "0.15.1"; + + src = fetchFromGitHub { + owner = "rnpgp"; + repo = "rnp"; + rev = "v${version}"; + sha256 = "1l7y99rcss5w24lil6nqwr0dzh2jvq0qxmdvq7j5yx3fdssd5xsv"; + }; + + buildInputs = [ zlib bzip2 json_c botan2 ]; + + cmakeFlags = [ + "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" + "-DBUILD_SHARED_LIBS=on" + "-DBUILD_TESTING=on" + "-DDOWNLOAD_GTEST=off" + "-DDOWNLOAD_RUBYRNP=off" + ]; + + nativeBuildInputs = [ asciidoctor cmake gnupg gtest pkg-config python3 ]; + + # NOTE: check-only inputs should ideally be moved to checkInputs, but it + # would fail during buildPhase. + # checkInputs = [ gtest python3 ]; + + outputs = [ "out" "lib" "dev" ]; + + preConfigure = '' + echo "v${version}" > version.txt + ''; + + meta = with lib; { + homepage = "https://github.com/rnpgp/rnp"; + description = "High performance C++ OpenPGP library, fully compliant to RFC 4880"; + license = licenses.bsd2; + platforms = platforms.all; + maintainers = with maintainers; [ ribose-jeffreylau ]; + }; +} |