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