summary refs log tree commit diff
path: root/pkgs/development/libraries/sqlite-amalgamation/default.nix
blob: 2ee3b6f2ecbb35f9d0657390bf02d0d16fd31de5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchurl, unzip }:

stdenv.mkDerivation {
  name = "sqlite-amalgamation-201505302257";

  src = fetchurl {
    url = "https://www.sqlite.org/snapshot/sqlite-amalgamation-201505302257.zip";
    sha256 = "0488wjrpnxd61g7pcka6fckx0q8yl1k26i6q5hrmkm92qcpml76h";
  };

  phases = [ "unpackPhase" "buildPhase" ];

  buildInputs = [ unzip ];

  unpackPhase = ''
    unzip $src
  '';

  buildPhase = ''
    mkdir -p $out
    cp sqlite3.c $out/
    cp sqlite3.h $out/
    cp sqlite3ext.h $out/
    cp shell.c $out/
  '';

  meta = {
    homepage = http://www.sqlite.org/;
    description = "A single C code file, named sqlite3.c, that contains all C code for the core SQLite library and the FTS3 and RTREE extensions";
    platforms = stdenv.lib.platforms.unix;
    maintainers = [ lib.maintainers.lassulus ];
  };
}