diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 47ba9c7f3c0e..255a24508f59 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -26241,6 +26241,11 @@ githubId = 47905926; name = "toyboot4e"; }; + tphanir = { + github = "tphanir"; + name = "phani"; + githubId = 125972587; + }; tpw_rules = { name = "Thomas Watson"; email = "twatson52@icloud.com"; diff --git a/pkgs/by-name/pb/pbc/package.nix b/pkgs/by-name/pb/pbc/package.nix new file mode 100644 index 000000000000..5486ce69ac63 --- /dev/null +++ b/pkgs/by-name/pb/pbc/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenv, + fetchurl, + gmp, + flex, + bison, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "pbc"; + version = "1.0.0"; + + src = fetchurl { + url = "https://crypto.stanford.edu/pbc/files/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; + hash = "sha256-GCdaNnKDB3uv419EMgBJnjsZxKN1SVPaKhsvDWtZItw="; + }; + + outputs = [ + "out" + "dev" + ]; + + buildInputs = [ + gmp + ]; + nativeBuildInputs = [ + bison + flex + ]; + + strictDeps = true; + + env = { + LEX = "flex"; + LEXLIB = "-lfl"; + ac_cv_lib_fl_yywrap = "yes"; + }; + + meta = { + description = "Pairing-based cryptography library by Stanford"; + homepage = "https://crypto.stanford.edu/pbc/"; + license = with lib.licenses; [ + lgpl3Only + asl20 + ]; + maintainers = with lib.maintainers; [ tphanir ]; + platforms = lib.platforms.unix; + }; +})