default.nix (833B)
1 { lib, stdenv, fetchFromGitHub, apacheHttpd, sqlite }: 2 3 stdenv.mkDerivation rec { 4 pname = "mod_mbtiles"; 5 version = "unstable-2022-05-25"; 6 7 src = fetchFromGitHub { 8 owner = "systemed"; 9 repo = pname; 10 rev = "f9d12a9581820630dd923c3c90aa8dcdcf65cb87"; 11 sha256 = "sha256-wOoLSNLgh0YXHUFn7WfUkQXpyWsgCrVZlMg55rvi9q4="; 12 }; 13 14 buildInputs = [ apacheHttpd sqlite ]; 15 16 buildPhase = '' 17 apxs -lsqlite3 -ca mod_mbtiles.c 18 ''; 19 20 installPhase = '' 21 runHook preInstall 22 install -D .libs/mod_mbtiles.so -t $out/modules 23 runHook postInstall 24 ''; 25 26 meta = with lib; { 27 homepage = "https://github.com/systemed/mod_mbtiles"; 28 description = "Serve tiles with Apache directly from an .mbtiles file"; 29 license = licenses.free; 30 maintainers = [ maintainers.sikmir ]; 31 platforms = platforms.unix; 32 }; 33 }