2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, curl, tzdata, fetchpatch, substituteAll }:
|
2020-02-18 08:40:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "howard-hinnant-date-unstable";
|
2020-03-12 17:08:44 +00:00
|
|
|
version = "2020-03-09";
|
2020-02-18 08:40:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "HowardHinnant";
|
|
|
|
repo = "date";
|
2020-03-12 17:08:44 +00:00
|
|
|
rev = "4c1968b8f038483037cadfdbad3215ce21d934bb";
|
|
|
|
sha256 = "0dywrf18v1znfnz0gdxgi2ydax466zq34gc1vvg2k7vq17a30wq3";
|
2020-02-18 08:40:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/HowardHinnant/date/commit/e56b2dce7e89a92e1b9b35caa13b3e938c4cedea.patch";
|
|
|
|
sha256 = "0m3qbhq7kmm9qa3jm6d2px7c1dxdj5k9lffgdvqnrwmhxwj1p9n2";
|
|
|
|
})
|
2020-03-03 06:24:40 +00:00
|
|
|
# Without this patch, this library will drop a `tzdata` directory into
|
|
|
|
# `~/Downloads` if it cannot find `/usr/share/zoneinfo`. Make the path it
|
|
|
|
# searches for `zoneinfo` be the one from the `tzdata` package.
|
|
|
|
(substituteAll {
|
|
|
|
src = ./make-zoneinfo-available.diff;
|
|
|
|
inherit tzdata;
|
|
|
|
})
|
2020-02-18 08:40:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TZ_LIB=true"
|
|
|
|
"-DBUILD_SHARED_LIBS=true"
|
2020-03-03 06:24:40 +00:00
|
|
|
"-DUSE_SYSTEM_TZ_DB=true"
|
2020-02-18 08:40:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-02-18 08:40:38 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "A date and time library based on the C++11/14/17 <chrono> header";
|
|
|
|
homepage = "https://github.com/HowardHinnant/date";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|