xprompt: fix build with gcc 14 (#394030)

This commit is contained in:
Azat Bahawi
2025-03-29 12:02:40 +00:00
committed by GitHub
+10 -5
View File
@@ -30,11 +30,16 @@ stdenv.mkDerivation rec {
];
postPatch =
let
configFile =
if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "cp ${configFile} config.h";
''
sed -i "8i #include <time.h>" xprompt.c
''
+ (
let
configFile =
if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "cp ${configFile} config.h"
);
makeFlags = [
"CC:=$(CC)"