{ description = "A TUI for the Canvas LMS."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; naersk.url = "github:nix-community/naersk"; }; outputs = { nixpkgs, flake-utils, rust-overlay, naersk, ... }: flake-utils.lib.eachDefaultSystem ( system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; naersk' = pkgs.callPackage naersk { }; defaultBuildOpts = { cargo = pkgs.rust-bin.stable.latest.default; rustc = pkgs.rust-bin.stable.latest.default; src = ./.; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl ]; mode = "build"; }; in { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ pkg-config rust-bin.stable.latest.rust-analyzer rust-bin.stable.latest.default openssl rust-bin.stable.latest.rustfmt ]; }; packages = { default = naersk'.buildPackage defaultBuildOpts; test = naersk'.buildPackage ( defaultBuildOpts // { mode = "test"; } ); }; } ); }