From 26559ac4037b2c2e8503355b2c3cfc50747ebcd9 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 27 Oct 2024 19:05:08 +0100 Subject: [PATCH] sqlite: split man into man output, add documentation as doc The full sqlite documentation is now available in the `doc` output, and the manual is in `man`. --- pkgs/development/libraries/sqlite/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index ecc0982f2bff7..65f72513828f7 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib, readline, ncurses +{ lib, stdenv, fetchurl, unzip, zlib, readline, ncurses , updateAutotoolsGnuConfigScriptsHook # for tests @@ -24,11 +24,15 @@ stdenv.mkDerivation rec { url = "https://sqlite.org/2024/sqlite-autoconf-${archiveVersion version}.tar.gz"; hash = "sha256-Z9P+bSaObq3crjcn/OWPzI6cU4ab3Qegxh443fKWUHE="; }; + docsrc = fetchurl { + url = "https://sqlite.org/2024/sqlite-doc-${archiveVersion version}.zip"; + hash = "sha256-6WkTH5PKefvGTVdyShA1c1iBVVpSYA2+acaeq3LJ/NE="; + }; - outputs = [ "bin" "dev" "out" ]; + outputs = [ "bin" "dev" "man" "doc" "out" ]; separateDebugInfo = stdenv.hostPlatform.isLinux; - nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; + nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook unzip ]; buildInputs = [ zlib ] ++ lib.optionals interactive [ readline ncurses ]; # required for aarch64 but applied for all arches for simplicity @@ -58,6 +62,10 @@ stdenv.mkDerivation rec { # Test for features which may not be available at compile time preBuild = '' + mkdir -p $doc/share/doc + unzip $docsrc + mv sqlite-doc-${archiveVersion version} $doc/share/doc/sqlite + # Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available. if cc -Werror=implicit-function-declaration -x c - -o "$TMPDIR/pread_pwrite_test" <<< \ ''$'#include \nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}'; then