lol
1{ lib, stdenv, fetchFromGitHub, openssl }:
2
3stdenv.mkDerivation rec {
4 pname = "fastpbkdf2";
5 version = "1.0.0";
6
7 src = fetchFromGitHub {
8 owner = "ctz";
9 repo = "fastpbkdf2";
10 rev = "v${version}";
11 sha256 = "09ax0h4ik3vhvp3s98lic93l3g9f4v1jkr5k6z4g1lvm7s3lrha2";
12 };
13
14 buildInputs = [ openssl ];
15
16 preBuild = ''
17 makeFlagsArray=(CFLAGS="-std=c99 -O3 -g")
18 '';
19
20 installPhase = ''
21 mkdir -p $out/{lib,include/fastpbkdf2}
22 cp *.a $out/lib
23 cp fastpbkdf2.h $out/include/fastpbkdf2
24 '';
25
26 meta = with lib; {
27 description = "A fast PBKDF2-HMAC-{SHA1,SHA256,SHA512} implementation in C";
28 homepage = "https://github.com/ctz/fastpbkdf2";
29 license = licenses.cc0;
30 maintainers = with maintainers; [ ledif ];
31 };
32}