nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 17.09 41 lines 1.5 kB view raw
1{ stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 name = "libargon2-${version}"; 5 version = "20161029"; 6 7 src = fetchFromGitHub { 8 owner = "P-H-C"; 9 repo = "phc-winner-argon2"; 10 rev = "${version}"; 11 sha256 = "021g8wi4g67ywm8zf3yncqwrmfz7ypgm1ih9wcmnxip5n75rymh5"; 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; 40 }; 41}