about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/haveged/default.nix
blob: c28ae465e0eb6ed92c1c01bb3aeba2eabc1b5196 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, stdenv
, fetchFromGitHub
}:

stdenv.mkDerivation rec {
  pname = "haveged";
  version = "1.9.18";

  src = fetchFromGitHub {
    owner = "jirka-h";
    repo = "haveged";
    rev = "v${version}";
    hash = "sha256-fyL/J2A13ap582j4gdC8u63Ah67Old+BaO/CLyEeN/g=";
  };

  strictDeps = true;

  postPatch = ''
    patchShebangs ent # test shebang
  '';

  installFlags = [
    "sbindir=$(out)/bin" # no reason for us to have a $out/sbin, its just a symlink to $out/bin
  ];

  doCheck = true;

  meta = with lib; {
    description = "A simple entropy daemon";
    longDescription = ''
      The haveged project is an attempt to provide an easy-to-use, unpredictable
      random number generator based upon an adaptation of the HAVEGE algorithm.
      Haveged was created to remedy low-entropy conditions in the Linux random device
      that can occur under some workloads, especially on headless servers. Current development
      of haveged is directed towards improving overall reliability and adaptability while minimizing
      the barriers to using haveged for other tasks.
    '';
    homepage = "https://github.com/jirka-h/haveged";
    changelog = "https://raw.githubusercontent.com/jirka-h/haveged/v${version}/ChangeLog";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ domenkozar ];
    platforms = platforms.unix;
    badPlatforms = platforms.darwin; # fails to build since v1.9.15
  };
}