diff --git a/pkgs/development/libraries/sqlite/3.48.0-fk-conflict-handling.patch b/pkgs/development/libraries/sqlite/3.48.0-fk-conflict-handling.patch deleted file mode 100644 index 6e3f58a7212d..000000000000 --- a/pkgs/development/libraries/sqlite/3.48.0-fk-conflict-handling.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/sqlite3.c b/sqlite3.c -index 80433f6..7c234f6 100644 ---- a/sqlite3.c -+++ b/sqlite3.c -@@ -231721,6 +231721,11 @@ static int sessionChangesetApply( - } - } - -+ { -+ int rc2 = sqlite3_exec(db, "PRAGMA defer_foreign_keys = 0", 0, 0, 0); -+ if( rc==SQLITE_OK ) rc = rc2; -+ } -+ - if( (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT)==0 ){ - if( rc==SQLITE_OK ){ - rc = sqlite3_exec(db, "RELEASE changeset_apply", 0, 0, 0); diff --git a/pkgs/development/libraries/sqlite/Libs.private.patch b/pkgs/development/libraries/sqlite/Libs.private.patch deleted file mode 100644 index e20d7ff18cc5..000000000000 --- a/pkgs/development/libraries/sqlite/Libs.private.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/sqlite3.pc.in b/sqlite3.pc.in -index a9f941b..3799671 100644 ---- a/sqlite3.pc.in -+++ b/sqlite3.pc.in -@@ -9,5 +9,5 @@ Name: SQLite - Description: SQL database engine - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lsqlite3 --Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@ -+Libs.private: @LIBS@ - Cflags: -I${includedir} diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 4722376372e5..bd98b5bd89fb 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -6,7 +6,6 @@ zlib, readline, ncurses, - updateAutotoolsGnuConfigScriptsHook, # for tests python3Packages, @@ -19,6 +18,7 @@ interactive ? false, gitUpdater, + buildPackages, }: let @@ -27,31 +27,19 @@ in stdenv.mkDerivation rec { pname = "sqlite${lib.optionalString interactive "-interactive"}"; - version = "3.48.0"; + version = "3.50.1"; # nixpkgs-update: no auto update # NB! Make sure to update ./tools.nix src (in the same directory). src = fetchurl { url = "https://sqlite.org/2025/sqlite-autoconf-${archiveVersion version}.tar.gz"; - hash = "sha256-rJkvf8o5id5+0f6ZwWNj+Eh5TIwyoVja/U65J6LgL9U="; + hash = "sha256-AKZRFNaXz6qP4GMCgddv0bd6/Nlc1eQOxqAsu62/6nE="; }; docsrc = fetchurl { url = "https://sqlite.org/2025/sqlite-doc-${archiveVersion version}.zip"; - hash = "sha256-PcE3/NfGrLMmr2CmG5hE3RXTdzywXnqc4nbEH3E9dlo="; + hash = "sha256-ZiIF9jOC5X0Qceqr08eQjdchFKggqOvPGg1xqdazgrQ="; }; - patches = [ - # https://sqlite.org/forum/forumpost/3380558ea82c8a3e - # Can be removed with the next release. - # Test: pkgsStatic.gnupg - ./Libs.private.patch - - # https://sqlite.org/forum/forumpost/00f3aab3d3be9690 - # https://sqlite.org/src/info/d7c07581 - # TODO: Remove in 3.49.0 - ./3.48.0-fk-conflict-handling.patch - ]; - outputs = [ "bin" "dev" @@ -61,8 +49,11 @@ stdenv.mkDerivation rec { ]; separateDebugInfo = stdenv.hostPlatform.isLinux; + depsBuildBuild = [ + buildPackages.stdenv.cc + ]; + nativeBuildInputs = [ - updateAutotoolsGnuConfigScriptsHook unzip ]; buildInputs = @@ -77,9 +68,21 @@ stdenv.mkDerivation rec { patchShebangs configure ''; - configureFlags = [ "--enable-threadsafe" ] ++ lib.optional interactive "--enable-readline"; + # sqlite relies on autosetup now; so many of the + # previously-understood flags are gone. They should instead be set + # on a per-output basis. + setOutputFlags = false; - env.NIX_CFLAGS_COMPILE = toString ([ + configureFlags = + [ + "--bindir=${placeholder "bin"}/bin" + "--includedir=${placeholder "dev"}/include" + "--libdir=${placeholder "out"}/lib" + ] + ++ lib.optional (!interactive) "--disable-readline" + ++ lib.optional (stdenv.hostPlatform.isStatic) "--disable-shared"; + + env.NIX_CFLAGS_COMPILE = toString [ "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_JSON1" @@ -100,7 +103,7 @@ stdenv.mkDerivation rec { "-DSQLITE_SECURE_DELETE" "-DSQLITE_MAX_VARIABLE_NUMBER=250000" "-DSQLITE_MAX_EXPR_DEPTH=10000" - ]); + ]; # Test for features which may not be available at compile time preBuild = '' @@ -145,7 +148,7 @@ stdenv.mkDerivation rec { }; updateScript = gitUpdater { - # No nicer place to look for patest version. + # No nicer place to look for latest version. url = "https://github.com/sqlite/sqlite.git"; # Expect tags like "version-3.43.0". rev-prefix = "version-"; diff --git a/pkgs/development/libraries/sqlite/tools.nix b/pkgs/development/libraries/sqlite/tools.nix index 64c9708594e8..62d2f3c915d9 100644 --- a/pkgs/development/libraries/sqlite/tools.nix +++ b/pkgs/development/libraries/sqlite/tools.nix @@ -19,14 +19,14 @@ let }: stdenv.mkDerivation rec { inherit pname; - version = "3.48.0"; + version = "3.50.1"; # nixpkgs-update: no auto update src = assert version == sqlite.version; fetchurl { url = "https://sqlite.org/2025/sqlite-src-${archiveVersion version}.zip"; - hash = "sha256-LXsDK2/f6MRCqoCfhQaHqB0GOB3uzXvjMSYB0oYS5kA="; + hash = "sha256-kJBZd3PGCknK67PBrFfbYm+sTZfLUYkIFai1KaTZw9w="; }; nativeBuildInputs = [ unzip ];