1 { lib, stdenv, fetchFromGitHub, Foundation }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "0254xfwscfkjc3fbvx6qgifr3pwkc2rb03z8pbvvqy098di9alhr";
14 makeFlags = [ "PREFIX=$(out)" ];
16 buildInputs = lib.optional stdenv.isDarwin Foundation;
18 installTargets = [ "install_hdrs" ]
19 ++ lib.optional (!stdenv.hostPlatform.isStatic) "install_shared_lib"
20 ++ lib.optional stdenv.hostPlatform.isStatic "install_lib";
22 postInstall = lib.optionalString stdenv.isDarwin ''
23 install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
26 enableParallelBuilding = true;
29 homepage = "https://github.com/google/cctz";
30 description = "C++ library for translating between absolute and civil times";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ orivej ];
33 platforms = platforms.all;