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`.
This commit is contained in:
Profpatsch 2024-10-27 19:05:08 +01:00
parent 2d9e8a176f
commit 629cfe1d2d

View File

@ -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
@ -82,6 +86,10 @@ stdenv.mkDerivation rec {
postInstall = ''
# Do not contaminate dependent libtool-based projects with sqlite dependencies.
sed -i $out/lib/libsqlite3.la -e "s/dependency_libs=.*/dependency_libs='''/"
mkdir -p $doc/share/doc
unzip $docsrc
mv sqlite-doc-${archiveVersion version} $doc/share/doc/sqlite
'';
doCheck = false; # fails to link against tcl