Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / fastpbkdf2 / default.nix
blob723edd6f29d404c1550cc2ed7d14dda97cb3a925
1 { lib, stdenv, fetchFromGitHub, openssl }:
3 stdenv.mkDerivation rec {
4   pname = "fastpbkdf2";
5   version = "1.0.0";
7   src = fetchFromGitHub {
8     owner = "ctz";
9     repo = "fastpbkdf2";
10     rev = "v${version}";
11     sha256 = "09ax0h4ik3vhvp3s98lic93l3g9f4v1jkr5k6z4g1lvm7s3lrha2";
12   };
14   buildInputs = [ openssl ];
16   preBuild = ''
17     makeFlagsArray=(CFLAGS="-std=c99 -O3 -g")
18   '';
20   installPhase = ''
21     mkdir -p $out/{lib,include/fastpbkdf2}
22     cp *.a $out/lib
23     cp fastpbkdf2.h $out/include/fastpbkdf2
24   '';
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   };