2021-12-08 16:19:03 +01:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, geoclue2-with-demo-agent
|
|
|
|
, lib
|
|
|
|
, m4
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule {
|
2021-07-27 16:21:24 +02:00
|
|
|
pname = "localtime";
|
2021-12-08 16:19:03 +01:00
|
|
|
version = "unstable-2021-11-23";
|
2017-12-03 11:41:22 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stebalien";
|
|
|
|
repo = "localtime";
|
2021-12-08 16:19:03 +01:00
|
|
|
rev = "3e5d6cd64444b2164e87cea03448bfb8eefd6ccd";
|
|
|
|
sha256 = "sha256-6uxxPq6abtRqM/R2Fw46ynP9PEkHggTSUymLYlQXQRU=";
|
2017-12-03 11:41:22 +01:00
|
|
|
};
|
2020-03-18 10:18:54 +01:00
|
|
|
|
2021-12-08 16:19:03 +01:00
|
|
|
vendorSha256 = "sha256-sf3sL6aO5jSytT2NtBkA3lhg77RIzbYkSC4fkH+cwwk=";
|
2017-12-03 11:41:22 +01:00
|
|
|
|
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#"
|
2018-12-21 15:24:02 +01:00
|
|
|
'';
|
|
|
|
|
2021-12-08 16:19:03 +01:00
|
|
|
nativeBuildInputs = [ m4 ];
|
|
|
|
|
2018-12-21 15:24:02 +01:00
|
|
|
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
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-12-03 11:41:22 +01:00
|
|
|
description = "A daemon for keeping the system timezone up-to-date based on the current location";
|
2020-04-01 03:11:51 +02:00
|
|
|
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;
|
2017-12-03 11:41:22 +01:00
|
|
|
};
|
|
|
|
}
|