nixpkgs/pkgs/by-name/rn/rnp/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

62 lines
1.3 KiB
Nix

{ lib
, stdenv
, asciidoctor
, botan3
, bzip2
, cmake
, fetchFromGitHub
, gnupg
, gtest
, json_c
, pkg-config
, python3
, sexpp
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rnp";
version = "0.17.1";
src = fetchFromGitHub {
owner = "rnpgp";
repo = "rnp";
rev = "v${finalAttrs.version}";
hash = "sha256-jUh7BxRnB6KePCk1jIvKzXgxSmWdKlQYmxshZZY4SBQ";
};
buildInputs = [ zlib bzip2 json_c botan3 sexpp ];
patches = [
];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DBUILD_SHARED_LIBS=on"
"-DBUILD_TESTING=on"
"-DDOWNLOAD_GTEST=off"
"-DDOWNLOAD_RUBYRNP=off"
"-DSYSTEM_LIBSEXPP=on"
];
nativeBuildInputs = [ asciidoctor cmake gnupg gtest pkg-config python3 ];
# NOTE: check-only inputs should ideally be moved to nativeCheckInputs, but it
# would fail during buildPhase.
# nativeCheckInputs = [ gtest python3 ];
outputs = [ "out" "lib" "dev" ];
preConfigure = ''
echo "v${finalAttrs.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 ];
};
})