{ description = "A command-line utility and Rust library to compute the WPA pre-shared key of a Wi-Fi SSID and passphrase"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; naersk = { url = "github:nix-community/naersk"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, flake-parts, naersk, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; perSystem = { pkgs, system, ... }: let naersk' = pkgs.callPackage naersk { }; in rec { # nix build # nix run . -- --help packages.default = packages.wpa-psk-cli; # nix build .#wpa-psk-cli # nix run .#wpa-psk-cli -- --help packages.wpa-psk-cli = naersk'.buildPackage { pname = "wpa-psk-cli"; src = builtins.path { path = ./.; name = "wpa-psk"; }; meta.mainProgram = "wpa-psk"; }; # nix develop devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc cargo rustfmt clippy cargo-audit cargo-edit rust-analyzer ]; }; # nix fmt formatter = pkgs.nixfmt-tree; }; }; }