38 lines
991 B
Nix
38 lines
991 B
Nix
{
|
|
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"
|
|
'';
|
|
};
|
|
};
|
|
}
|