From 83d5162279d8a38c062830a4953202f483c9b0ee 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..6b631ddd16b3c 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 @@ -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