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