2021-12-19 01:06:50 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, geoclue2-with-demo-agent
|
|
|
|
, lib
|
|
|
|
, m4
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule {
|
2021-08-22 07:53:02 +00:00
|
|
|
pname = "localtime";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "unstable-2021-11-23";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stebalien";
|
|
|
|
repo = "localtime";
|
2021-12-19 01:06:50 +00:00
|
|
|
rev = "3e5d6cd64444b2164e87cea03448bfb8eefd6ccd";
|
|
|
|
sha256 = "sha256-6uxxPq6abtRqM/R2Fw46ynP9PEkHggTSUymLYlQXQRU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
vendorSha256 = "sha256-sf3sL6aO5jSytT2NtBkA3lhg77RIzbYkSC4fkH+cwwk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-19 01:06:50 +00: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#"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
nativeBuildInputs = [ m4 ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2021-12-19 01:06:50 +00:00
|
|
|
runHook preInstall
|
|
|
|
make PREFIX="$out" install
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A daemon for keeping the system timezone up-to-date based on the current location";
|
|
|
|
homepage = "https://github.com/Stebalien/localtime";
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
}
|