2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bzip2
|
|
|
|
, libdivsufsort
|
|
|
|
, jsoncpp
|
|
|
|
, openssl
|
|
|
|
, mpfr
|
|
|
|
}:
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "sp800-90b-entropyassessment";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.1.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "usnistgov";
|
|
|
|
repo = "SP800-90B_EntropyAssessment";
|
2024-06-24 18:47:55 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-KZQ7kC0PbBkjLEQZIqYakQ91OvCxruhdfUwiRHtno3w=";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ bzip2 libdivsufsort jsoncpp openssl mpfr ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "-march=native" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/cpp";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ea_* $out/bin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/usnistgov/SP800-90B_EntropyAssessment";
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Implementation of min-entropy assessment methods included in Special Publication 800-90B";
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.nistSoftware;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with lib.maintainers; [ orichter thillux ];
|
|
|
|
};
|
2024-06-24 18:47:55 +00:00
|
|
|
})
|