nixpkgs/pkgs/tools/system/localtime/default.nix

42 lines
1 KiB
Nix
Raw Normal View History

2021-12-08 16:19:03 +01:00
{ buildGoModule
, fetchFromGitHub
, geoclue2-with-demo-agent
, lib
, m4
}:
buildGoModule {
pname = "localtime";
2021-12-08 16:19:03 +01:00
version = "unstable-2021-11-23";
src = fetchFromGitHub {
owner = "Stebalien";
repo = "localtime";
2021-12-08 16:19:03 +01:00
rev = "3e5d6cd64444b2164e87cea03448bfb8eefd6ccd";
sha256 = "sha256-6uxxPq6abtRqM/R2Fw46ynP9PEkHggTSUymLYlQXQRU=";
};
2020-03-18 10:18:54 +01:00
2021-12-08 16:19:03 +01:00
vendorSha256 = "sha256-sf3sL6aO5jSytT2NtBkA3lhg77RIzbYkSC4fkH+cwwk=";
2021-12-08 16:19:03 +01:00
postPatch = ''
demoPath="${geoclue2-with-demo-agent}/libexec/geoclue-2.0/demos/agent"
sed -i localtimed.go -e "s#/usr/lib/geoclue-2.0/demos/agent#$demoPath#"
'';
2021-12-08 16:19:03 +01:00
nativeBuildInputs = [ m4 ];
installPhase = ''
2021-12-08 16:19:03 +01:00
runHook preInstall
make PREFIX="$out" install
runHook postInstall
2018-04-06 00:15:20 +02:00
'';
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";
2021-12-08 16:19:03 +01:00
maintainers = with maintainers; [ lovesegfault ];
2018-09-12 22:05:26 +02:00
platforms = platforms.linux;
license = licenses.gpl3;
};
}