{ inputs = { flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { self, flake-utils, naersk, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = (import nixpkgs) { inherit system; }; naersk' = pkgs.callPackage naersk { }; in rec { # For `nix build` & `nix run`: packages.default = naersk'.buildPackage { src = ./.; nativeBuildInputs = with pkgs; [ pkg-config openssl ]; GIT_HASH = "000000000000000000000000000000"; }; # For `nix develop`: devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc cargo cargo-watch clippy rustfmt rust-analyzer pkg-config openssl ]; env = { RUST_BACKTRACE = 1; RUST_LOG = "debug"; }; }; }); }