From dd3624849e79c8b9d2d63d5e6251a71092ab3390 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:53:28 -0700 Subject: [PATCH] tzdata: fix build on darwin Version 2022f doesn't build on Darwin because its detection of whether getrandom is available doesn't work. This has been fixed upstream, and we can pull in the patches. --- pkgs/data/misc/tzdata/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 480535135952..1453b3899ef7 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, buildPackages }: +{ lib, stdenv, fetchurl, fetchpatch, buildPackages }: stdenv.mkDerivation rec { pname = "tzdata"; @@ -19,6 +19,17 @@ stdenv.mkDerivation rec { patches = lib.optionals stdenv.hostPlatform.isWindows [ ./0001-Add-exe-extension-for-MS-Windows-binaries.patch + ] ++ [ + (fetchpatch { + name = "fix-get-random-on-osx-1.patch"; + url = "https://github.com/eggert/tz/commit/5db8b3ba4816ccb8f4ffeb84f05b99e87d3b1be6.patch"; + hash = "sha256-FevGjiSahYwEjRUTvRY0Y6/jUO4YHiTlAAPixzEy5hw="; + }) + (fetchpatch { + name = "fix-get-random-on-osx-2.patch"; + url = "https://github.com/eggert/tz/commit/841183210311b1d4ffb4084bfde8fa8bdf3e6757.patch"; + hash = "sha256-1tUTZBMT7V463P7eygpFS6/k5gTeeXumk5+V4gdKpEI="; + }) ]; outputs = [ "out" "bin" "man" "dev" ];