nyazoom/shell.nix

29 lines
665 B
Nix

{ pkgs ? import <nixpkgs> { }
, additionalBuildInputs ? [ ]
, platforms ? [ "x86_64-linux" "aarch64-darwin" ]
}:
with pkgs;
mkShell rec {
inherit platforms;
nativeBuildInputs = [
# Build Deps
pkg-config
openssl
# Build Tools
# TODO: Add prettier and prettier-plugin-jinja-template
sqlx-cli
] ++ lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
];
buildInputs = [
sqlite
] ++ additionalBuildInputs;
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
DATABASE_URL = "sqlite://.cache/data";
CACHE_DIR = "./.cache";
}