about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/localtime/default.nix
blob: ee2a25bdf79d7f024fa7137d1dfde3fc9e2375ed (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
{ buildGoModule
, fetchFromGitHub
, lib
, m4
}:

buildGoModule {
  pname = "localtime";
  version = "unstable-2022-02-20";

  src = fetchFromGitHub {
    owner = "Stebalien";
    repo = "localtime";
    rev = "c1e10aa4141ed2bb01986b48e0e942e618993c06";
    hash = "sha256-bPQ1c2KUTkxx2g7IvLmrKgJKfRHTLlTXLR/QQ0O4CrI=";
  };

  vendorSha256 = "sha256-12JnEU41sp9qRP07p502EYogveE+aNdfmLwlDRbIdxU=";

  nativeBuildInputs = [ m4 ];

  buildPhase = ''
    runHook preBuild
    make PREFIX="$out"
    runHook postBuild
  '';

  doCheck = false; # no tests

  installPhase = ''
    runHook preInstall
    make PREFIX="$out" install
    runHook postInstall
  '';

  meta = with lib; {
    description = "A daemon for keeping the system timezone up-to-date based on the current location";
    homepage = "https://github.com/Stebalien/localtime";
    maintainers = with maintainers; [ lovesegfault ];
    platforms = platforms.linux;
    license = licenses.gpl3;
  };
}