2020-11-24 20:58:05 +00:00
|
|
|
{ stdenv, fetchurl, openssl, util-linux, getconf }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "scrypt";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.tarsnap.com/scrypt/${pname}-${version}.tgz";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "1hnl0r6pmyxiy4dmafmqk1db7wpc0x9rqpzqcwr9d2cmghcj6byz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-libscrypt-kdf" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
nativeBuildInputs = [ getconf ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patchPhase = ''
|
2020-10-16 20:44:37 +00:00
|
|
|
for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace $f --replace "command -p " ""
|
|
|
|
done
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
patchShebangs tests/test_scrypt.sh
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
2020-11-24 20:58:05 +00:00
|
|
|
checkInputs = [ util-linux ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Encryption utility";
|
|
|
|
homepage = "https://www.tarsnap.com/scrypt.html";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|