2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, openssl
|
|
|
|
, getconf
|
|
|
|
, util-linux
|
|
|
|
}:
|
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";
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = lib.optionals stdenv.isLinux [ util-linux ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Encryption utility";
|
|
|
|
homepage = "https://www.tarsnap.com/scrypt.html";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|