2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jitterentropy";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "3.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "smuellerDD";
|
|
|
|
repo = "jitterentropy-library";
|
|
|
|
rev = "v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-CPvgc/W5Z2OfbP9Lp2tQevUQZr+xlh6q5r5Fp2WUHhg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
hardeningDisable = [ "fortify" ]; # avoid warnings
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# prevent jitterentropy from builtin strip to allow controlling this from the derivation's
|
|
|
|
# settings. Also fixes a strange issue, where this strip may fail when cross-compiling.
|
2020-04-24 23:36:52 +00:00
|
|
|
installFlags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
"INSTALL_STRIP=install"
|
2022-02-10 20:34:41 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Provides a noise source using the CPU execution timing jitter";
|
|
|
|
homepage = "https://github.com/smuellerDD/jitterentropy-library";
|
2022-02-10 20:34:41 +00:00
|
|
|
changelog = "https://github.com/smuellerDD/jitterentropy-library/raw/v${version}/CHANGES.md";
|
|
|
|
license = with licenses; [ bsd3 /* OR */ gpl2Only ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ johnazoidberg c0bw3b ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|