diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 51 |
1 files changed, 29 insertions, 22 deletions
@@ -1,28 +1,35 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem - (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { devShell = pkgs.mkShell { - buildInputs = with pkgs; [ - (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ - sqlite - watchexec - sanic - setuptools - ])) + outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + in + with pkgs; + { + devShell = mkShell { + buildInputs = [ + cargo-watch + lld + openssl + pkg-config + rust-bin.stable."1.78.0".default + sqlite + watchexec ]; - shellHook = '' - export DEBUG="TRUE" - export HOST="127.0.0.1" - export PORT="8080" - export KEY="1234" - ''; - }; } - ); + }; + } + ); } + |