1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "libscrypt";
9 version = "1.22";
10
11 src = fetchFromGitHub {
12 owner = "technion";
13 repo = "libscrypt";
14 rev = "v${version}";
15 sha256 = "sha256-QWWqC10bENemG5FYEog87tT7IxDaBJUDqu6j/sO3sYE=";
16 };
17
18 buildFlags = lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS= LDFLAGS_EXTRA= CFLAGS_EXTRA=";
19
20 installFlags = [ "PREFIX=$(out)" ];
21 installTargets = lib.optional stdenv.hostPlatform.isDarwin "install-osx";
22
23 doCheck = true;
24
25 meta = with lib; {
26 description = "Shared library that implements scrypt() functionality";
27 homepage = "https://lolware.net/2014/04/29/libscrypt.html";
28 license = licenses.bsd2;
29 maintainers = with maintainers; [ davidak ];
30 platforms = platforms.unix;
31 };
32}