summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/nt/ntpstat/package.nix
blob: 305c79fbc0d6f3accbeb39891fa9c97c59cd9e7d (plain)
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
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "ntpstat";
  version = "0.6";

  src = fetchFromGitHub {
    owner = "mlichvar";
    repo = "ntpstat";
    rev = "${finalAttrs.version}";
    hash = "sha256-dw6Pi+aB7uK65H0HL7q1vYnM5Dp0D+kG+ZIaiv8VH5I=";
  };

  postPatch = ''
    patchShebangs ntpstat
  '';

  makeFlags = [ "prefix=${placeholder "out"}" ];

  meta = {
    description = "Print the ntpd or chronyd synchronisation status";
    homepage = "https://github.com/mlichvar/ntpstat";
    license = lib.licenses.mit;
    mainProgram = "ntpstat";
    maintainers = with lib.maintainers; [ hzeller ];
    platforms = lib.platforms.all;
  };
})