From eaa3b1d4d5095a8821a0969981c4f029c52435fe Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 31 May 2026 10:32:45 +0200 Subject: [PATCH] dateutils: fix build errors --- pkgs/by-name/da/dateutils/package.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/da/dateutils/package.nix b/pkgs/by-name/da/dateutils/package.nix index 41fac34b3d23..a73c984fe2e1 100644 --- a/pkgs/by-name/da/dateutils/package.nix +++ b/pkgs/by-name/da/dateutils/package.nix @@ -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;