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 = [
|
|
|
|
pkg-config
|
|
|
|
openssl
|
2024-11-15 07:23:19 -08:00
|
|
|
# TODO: Figure out a better way to include sqlx only in dev shells (release shell?)
|
|
|
|
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;
|
2024-11-21 16:43:54 -08:00
|
|
|
DATABASE_URL = "sqlite://.cache/data";
|
2025-01-12 15:12:17 -08:00
|
|
|
CACHE_DIR = "./.cache";
|
2024-08-28 15:05:40 -07:00
|
|
|
}
|