Skip to content

Commit

Permalink
sqlite: split man into man output, add documentation as doc
Browse files Browse the repository at this point in the history
The full sqlite documentation is now available in the `doc` output,
and the manual is in `man`.
  • Loading branch information
Profpatsch committed Oct 28, 2024
1 parent 61f3605 commit e3b07c0
Showing 1 changed file with 11 additions and 3 deletions.
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

0 comments on commit e3b07c0

Please sign in to comment.