2020-09-15 10:48:10 -07:00
|
|
|
{ stdenv, fetchurl, openssl, utillinux }:
|
2013-09-02 18:49:08 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "scrypt";
|
2020-09-15 10:48:10 -07:00
|
|
|
version = "1.3.1";
|
2013-09-02 18:49:08 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "https://www.tarsnap.com/scrypt/${pname}-${version}.tgz";
|
2020-09-15 10:48:10 -07:00
|
|
|
sha256 = "1hnl0r6pmyxiy4dmafmqk1db7wpc0x9rqpzqcwr9d2cmghcj6byz";
|
2013-09-02 18:49:08 -07:00
|
|
|
};
|
|
|
|
|
2020-09-15 10:48:10 -07:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-libscrypt-kdf" ];
|
|
|
|
|
2013-09-02 18:49:08 -07:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2015-08-31 05:45:18 -07:00
|
|
|
patchPhase = ''
|
2020-09-15 10:48:10 -07:00
|
|
|
for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do
|
2017-10-11 21:40:56 -07:00
|
|
|
substituteInPlace $f --replace "command -p " ""
|
|
|
|
done
|
2020-09-15 10:48:10 -07:00
|
|
|
|
|
|
|
patchShebangs tests/test_scrypt.sh
|
2015-08-31 05:45:18 -07:00
|
|
|
'';
|
|
|
|
|
2020-09-15 10:48:10 -07:00
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
checkInputs = [ utillinux ];
|
|
|
|
|
2017-10-11 21:40:56 -07:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 07:21:08 -07:00
|
|
|
description = "Encryption utility";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.tarsnap.com/scrypt.html";
|
2017-10-11 21:40:56 -07:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2013-09-02 18:49:08 -07:00
|
|
|
};
|
|
|
|
}
|