dateutils: fix build errors

This commit is contained in:
Alexis Hildebrandt 2026-05-31 10:32:45 +02:00
commit eaa3b1d4d5

View file

@ -2,8 +2,11 @@
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
tzdata,
bison,
flex,
}:
stdenv.mkDerivation (finalAttrs: {
@ -12,20 +15,33 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = "https://bitbucket.org/hroptatyr/dateutils/downloads/dateutils-${finalAttrs.version}.tar.xz";
sha256 = "sha256-uP6gsJcUu63yArmzQ0zOa1nCgueGkmjQwIuFiA/btEY=";
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 ];
nativeBuildInputs = [
autoreconfHook
flex
bison
];
buildInputs = [ tzdata ]; # needed for datezone
enableParallelBuilding = true;
doCheck = true;
meta = {
description = "Bunch of tools that revolve around fiddling with dates and times in the command line";
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;