From 4d58f8e4351afaaeb6d8ad2cd6bb4586f04d3359 Mon Sep 17 00:00:00 2001 From: Sam Pointon Date: Wed, 27 Aug 2025 14:00:03 +0100 Subject: [PATCH] sqlite: enable limit-on-update/delete Limit-on-update/delete is useful for, amongst other things, bounding the amount of work done in a single SQL statement. It is not enabled by upstream by default, but Debian does enable it. Because the parser generator doesn't receive NIX_CFLAGS_COMPILE, the setting has to go through the --enable-update-limit configure flag. Maybe in the future, if this derivation moves to e.g. CFLAGS, this feature enablement can be made uniform with the others. --- pkgs/development/libraries/sqlite/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index f8722d6cd3d1..54b4ef4557f2 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -83,6 +83,8 @@ stdenv.mkDerivation rec { "--includedir=${placeholder "dev"}/include" "--libdir=${placeholder "out"}/lib" (if stdenv.hostPlatform.isStatic then "--disable-tcl" else "--with-tcl=${lib.getLib tcl}/lib") + # Enabling limit-on-update/delete by adding -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT to NIX_CFLAGS_COMPILE does not work: the lemon parser generator (built early in buildPhase) doesn't receive the flag when it's invoked, as it's not been wrapped with Nix magic. + "--enable-update-limit" ] ++ lib.optional (!interactive) "--disable-readline" # autosetup only looks up readline.h in predefined set of directories.