2024-12-27 02:02:41 -08:00
|
|
|
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, additionalBuildInputs ? [ ]
|
|
|
|
, platforms ? [ "x86_64-linux" "aarch64-darwin" ]
|
|
|
|
}:
|
2024-08-28 15:05:40 -07:00
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
mkShell rec {
|
2024-12-27 02:02:41 -08:00
|
|
|
inherit platforms;
|
|
|
|
|
2024-08-28 15:05:40 -07:00
|
|
|
nativeBuildInputs = [
|
2025-01-12 16:46:44 -08:00
|
|
|
# Build Deps
|
2024-08-28 15:05:40 -07:00
|
|
|
pkg-config
|
|
|
|
openssl
|
2025-01-12 16:46:44 -08:00
|
|
|
|
|
|
|
# Build Tools
|
|
|
|
# TODO: Add prettier and prettier-plugin-jinja-template
|
2024-11-15 07:23:19 -08:00
|
|
|
sqlx-cli
|
2024-11-15 17:25:21 -08:00
|
|
|
] ++ lib.optionals pkgs.stdenv.isDarwin [
|
|
|
|
# Additional darwin specific inputs can be set here
|
|
|
|
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
|
2024-08-28 15:05:40 -07:00
|
|
|
];
|
2024-11-15 22:05:30 -08:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
] ++ additionalBuildInputs;
|
2024-08-28 15:05:40 -07:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
2025-01-12 18:43:35 -08:00
|
|
|
DATABASE_URL = "sqlite://.cache/data"; # This is only used by the sqlx-cli
|
|
|
|
CACHE_DIR = "./.cache"; # The default is a system path, not suitable for dev environments
|
|
|
|
DIST_DIR = "./dist"; # This is currently the default, but the dev shell should override it anyway
|
2024-08-28 15:05:40 -07:00
|
|
|
}
|