1{ lib
2, stdenv
3, fetchFromGitHub
4, autoreconfHook
5, libtool
6, pkg-config
7, testers
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "libb2";
12 version = "0.98.1";
13
14 src = fetchFromGitHub {
15 owner = "BLAKE2";
16 repo = "libb2";
17 rev = "refs/tags/v${finalAttrs.version}";
18 sha256 = "0qj8aaqvfcavj1vj5asm4pqm03ap7q8x4c2fy83cqggvky0frgya";
19 };
20
21 nativeBuildInputs = [
22 autoreconfHook
23 libtool
24 pkg-config
25 ];
26
27 configureFlags = lib.optional stdenv.hostPlatform.isx86 "--enable-fat=yes";
28
29 enableParallelBuilding = true;
30
31 doCheck = true;
32
33 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
34
35 meta = with lib; {
36 description = "The BLAKE2 family of cryptographic hash functions";
37 homepage = "https://blake2.net/";
38 pkgConfigModules = [ "libb2" ];
39 platforms = platforms.all;
40 maintainers = with maintainers; [ dfoxfranke dotlambda ];
41 license = licenses.cc0;
42 };
43})