lnchr 0.2.2

A fuzzy terminal app launcher
{
  inputs = {
    fenix = {
      url = "github:nix-community/fenix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixpkgs.url = "nixpkgs/nixos-unstable";
    crane.url = "github:ipetkov/crane";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      fenix,
      nixpkgs,
      crane,
      flake-utils,
      ...
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};

        fenixToolchain =
          with fenix.packages.${system};
          stable.withComponents [
            "cargo"
            "rustc"
            "rust-src"
          ];

        craneLib = (crane.mkLib pkgs).overrideToolchain fenixToolchain;

        lnchr = craneLib.buildPackage {
          src = craneLib.cleanCargoSource ./.;
          strictDeps = true;
          meta = {
            description = "A fuzzy terminal app launcher";
            homepage = "https://codeberg.org/paul-hartwich/lnchr";
            license = pkgs.lib.licenses.mit;
            mainProgram = "lnchr";
          };
        };
      in
      {
        packages = {
          default = lnchr;
          lnchr = lnchr;
        };

        apps.default = flake-utils.lib.mkApp { drv = lnchr; };

        devShells.default = craneLib.devShell {
          packages = with fenix.packages.${system}; [
            stable.clippy
            stable.rustfmt
            pkgs.rust-analyzer
          ];
        };
      }
    );
}