{ description = "SerialTUI"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, flake-utils, naersk, nixpkgs, rust-overlay, }: flake-utils.lib.eachDefaultSystem ( system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; naersk' = pkgs.callPackage naersk { }; rustToolchain = pkgs.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; targets = [ "x86_64-pc-windows-gnu" "x86_64-unknown-linux-gnu" ]; }; in rec { # For `nix build` & `nix run`: defaultPackage = naersk'.buildPackage { src = ./.; }; # For `nix develop`: devShell = pkgs.mkShell { buildInputs = with pkgs; [ cargo-audit cargo-bundle cargo-watch dioxus-cli rust-analyzer rustToolchain lldb_17 ]; nativeBuildInputs = with pkgs; [ pkg-config systemd cairo git gtk3 libayatana-indicator webkitgtk_4_1 libclang ]; }; } ); }