Set up nix develop to work with nix flakes

This commit is contained in:
heyarne 2021-06-03 11:57:14 +02:00
commit 05080e720a
3 changed files with 92 additions and 0 deletions

25
shell.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs ? import <nixpkgs> { } }:
let
lib = pkgs.lib;
in pkgs.mkShell rec {
name = "datasette";
buildInputs = with pkgs; [
sqlite
libspatialite
spatialite_tools
rlwrap
datasette
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
shellHook = ''
datasette \
--load-extension=mod_spatialite.so \
-m metadata.yml -h 0.0.0.0 --cors --setting default_cache_ttl 1800 \
--immutable dbs/*.db
datasette dbs/*
'';
}