summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/da/dateutils/package.nix
blob: a73c984fe2e1487a43da2aac1e099a333de0da0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  autoreconfHook,
  tzdata,
  bison,
  flex,
}:

stdenv.mkDerivation (finalAttrs: {
  version = "0.4.11";
  pname = "dateutils";

  src = fetchurl {
    url = "https://bitbucket.org/hroptatyr/dateutils/downloads/dateutils-${finalAttrs.version}.tar.xz";
    hash = "sha256-uP6gsJcUu63yArmzQ0zOa1nCgueGkmjQwIuFiA/btEY=";
  };

  patches = [
    # TODO: Remove when updating to the next release.
    (fetchpatch {
      url = "https://github.com/hroptatyr/dateutils/commit/b30902c2f46288b570c7fa8de06e17cc7dfd6a37.patch";
      hash = "sha256-38LBUv4FLpK3TTIXXvIGr0qE0CSqF2IqCbZY5RGyi6Q=";
    })
  ];

  # https://github.com/hroptatyr/dateutils/issues/148
  postPatch = "rm test/dzone.008.ctst";

  nativeBuildInputs = [
    autoreconfHook
    flex
    bison
  ];
  buildInputs = [ tzdata ]; # needed for datezone

  enableParallelBuilding = true;

  doCheck = true;

  meta = {
    description = "Command-line utilities for date and time calculations and conversions";
    homepage = "http://www.fresse.org/dateutils/";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.unix;
    maintainers = [ lib.maintainers.paperdigits ];
  };
})