Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 41 lines 1.5 kB view raw
1{ stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 name = "libargon2-${version}"; 5 version = "20171227"; 6 7 src = fetchFromGitHub { 8 owner = "P-H-C"; 9 repo = "phc-winner-argon2"; 10 rev = "${version}"; 11 sha256 = "0sc9zca1anqk41017vjpas4kxi4cbn0zvicv8vj8p2sb2gy94bh8"; 12 }; 13 14 installPhase = '' 15 runHook preInstall 16 mkdir -p $out/lib/pkgconfig 17 substitute libargon2.pc $out/lib/pkgconfig/libargon2.pc \ 18 --replace @UPSTREAM_VER@ "${version}" \ 19 --replace @HOST_MULTIARCH@ "" \ 20 --replace 'prefix=/usr' "prefix=$out" 21 22 make install PREFIX=$out 23 ln -s $out/lib/libargon2.so $out/lib/libargon2.so.0 24 runHook postInstall 25 ''; 26 27 meta = with stdenv.lib; { 28 description = "A key derivation function that was selected as the winner of the Password Hashing Competition in July 2015"; 29 longDescription = '' 30 A password-hashing function created by by Alex Biryukov, Daniel Dinu, and 31 Dmitry Khovratovich. Argon2 was declared the winner of the Password 32 Hashing Competition (PHC). There were 24 submissions and 9 finalists. 33 Catena, Lyra2, Makwa and yescrypt were given special recognition. The PHC 34 recommends using Argon2 rather than legacy algorithms. 35 ''; 36 homepage = https://www.argon2.com/; 37 license = with licenses; [ asl20 cc0 ]; 38 maintainers = with maintainers; [ taeer olynch ]; 39 platforms = platforms.linux ++ platforms.darwin; 40 }; 41}