2021-12-03 23:19:23 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, openssl
|
|
|
|
, getconf
|
|
|
|
, util-linux
|
|
|
|
}:
|
2013-09-03 01:49:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "scrypt";
|
2023-10-19 09:54:45 +00:00
|
|
|
version = "1.3.2";
|
2013-09-03 01:49:08 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://www.tarsnap.com/scrypt/${pname}-${version}.tgz";
|
2023-10-19 09:54:45 +00:00
|
|
|
sha256 = "sha256-1jLBGTQgrG+uv5SC5l4z06VmTszWQ7CaUJ0h0cHym+I=";
|
2013-09-03 01:49:08 +00:00
|
|
|
};
|
|
|
|
|
2020-09-15 17:48:10 +00:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-libscrypt-kdf" ];
|
|
|
|
|
2013-09-03 01:49:08 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-09-18 09:17:00 +00:00
|
|
|
nativeBuildInputs = [ getconf ];
|
|
|
|
|
2015-08-31 12:45:18 +00:00
|
|
|
patchPhase = ''
|
2020-09-15 17:48:10 +00:00
|
|
|
for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do
|
2017-10-12 04:40:56 +00:00
|
|
|
substituteInPlace $f --replace "command -p " ""
|
|
|
|
done
|
2020-09-15 17:48:10 +00:00
|
|
|
|
|
|
|
patchShebangs tests/test_scrypt.sh
|
2015-08-31 12:45:18 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-15 17:48:10 +00:00
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = lib.optionals stdenv.isLinux [ util-linux ];
|
2020-09-15 17:48:10 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "Encryption utility";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.tarsnap.com/scrypt.html";
|
2017-10-12 04:40:56 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2013-09-03 01:49:08 +00:00
|
|
|
};
|
|
|
|
}
|