From 968ad2e99f72fe5de64c51d7347545a36ba5c7b6 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 13 Dec 2025 10:24:33 +0100 Subject: [PATCH] libfaketime: fix build with structuredAttrs --- pkgs/by-name/li/libfaketime/package.nix | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/li/libfaketime/package.nix b/pkgs/by-name/li/libfaketime/package.nix index 706c1e5df9e2..d66ac6704ecb 100644 --- a/pkgs/by-name/li/libfaketime/package.nix +++ b/pkgs/by-name/li/libfaketime/package.nix @@ -52,24 +52,27 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail @DATE_CMD@ ${lib.getExe' coreutils "date"} ''; - PREFIX = placeholder "out"; - LIBDIRNAME = "/lib"; - - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.cc.isClang [ - "-Wno-error=cast-function-type" - "-Wno-error=format-truncation" - ] - # https://github.com/wolfcw/libfaketime/blob/6714b98794a9e8a413bf90d2927abf5d888ada99/README#L101-L104 - ++ lib.optionals (stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isRiscV64) [ - "-DFORCE_PTHREAD_NONVER" - ] - ); + env = { + PREFIX = placeholder "out"; + LIBDIRNAME = "/lib"; + NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.cc.isClang [ + "-Wno-error=cast-function-type" + "-Wno-error=format-truncation" + ] + # https://github.com/wolfcw/libfaketime/blob/6714b98794a9e8a413bf90d2927abf5d888ada99/README#L101-L104 + ++ lib.optionals (stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isRiscV64) [ + "-DFORCE_PTHREAD_NONVER" + ] + ); + }; nativeCheckInputs = [ perl ]; doCheck = true; + __structuredAttrs = true; + meta = { description = "Report faked system time to programs without having to change the system-wide time"; homepage = "https://github.com/wolfcw/libfaketime/";