Initial push
This commit is contained in:
37
flake.nix
Normal file
37
flake.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
description = "chess_interface Development Environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
in {
|
||||
devShells."${system}".default = let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rust-analyzer
|
||||
postgresql
|
||||
adminer
|
||||
];
|
||||
shellHook = ''
|
||||
cargo build
|
||||
echo "Welcome to the chess_interface development environment!"
|
||||
echo "Available commands:"
|
||||
echo " - To start PostgreSQL: sudo service postgresql start"
|
||||
echo " - To access Adminer: adminer --server localhost --username your_username --db your_database"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user