Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite: split man into man output, add documentation as doc #351724

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions pkgs/development/libraries/sqlite/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, zlib, readline, ncurses
{ lib, stdenv, fetchurl, unzip, zlib, readline, ncurses
, updateAutotoolsGnuConfigScriptsHook

# for tests
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down