30 lines
740 B
Nix
30 lines
740 B
Nix
|
|
{
|
||
|
|
description = "Rust dev env for Meltano toy project";
|
||
|
|
|
||
|
|
inputs = {
|
||
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||
|
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
|
};
|
||
|
|
|
||
|
|
outputs = { self, nixpkgs, flake-utils }:
|
||
|
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
|
let
|
||
|
|
pkgs = import nixpkgs { inherit system; };
|
||
|
|
in {
|
||
|
|
devShells.default = pkgs.mkShell {
|
||
|
|
buildInputs = with pkgs; [
|
||
|
|
rustup
|
||
|
|
pkg-config
|
||
|
|
openssl
|
||
|
|
postgresql
|
||
|
|
sqlx-cli
|
||
|
|
];
|
||
|
|
|
||
|
|
shellHook = ''
|
||
|
|
export DATABASE_URL=postgres://app:app123@localhost:5432/app_db
|
||
|
|
echo "✅ Rust + PostgreSQL dev env ready"
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
});
|
||
|
|
}
|