2022-09-22 12:36:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, Foundation }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cctz";
|
|
|
|
version = "2.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cctz";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0254xfwscfkjc3fbvx6qgifr3pwkc2rb03z8pbvvqy098di9alhr";
|
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Foundation;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
installTargets = [ "install_hdrs" ]
|
|
|
|
++ lib.optional (!stdenv.targetPlatform.isStatic) "install_shared_lib"
|
|
|
|
++ lib.optional stdenv.targetPlatform.isStatic "install_lib";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/google/cctz";
|
|
|
|
description = "C++ library for translating between absolute and civil times";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|