taskfinder 2.14.0

A terminal user interface that extracts and displays tasks from plain text files, hooking into your default terminal-based editor for editing.
{
  description = "taskfinder - Display tasks from plain text files";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";

    # Use fenix to supply newer Rust compiler - Remove when it's no longer needed
    fenix = {
      url = "github:nix-community/fenix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

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

        # This block is part of the fenix necessity
        toolchain = fenix.packages.${system}.latest.toolchain;
        rustPlatform = pkgs.makeRustPlatform {
          rustc = toolchain;
          cargo = toolchain;
        };

        pname = "taskfinder";
        version = "2.13.0";

        src = pkgs.fetchFromGitea {
          domain = "codeberg.org";
          owner = "kdwarn";
          repo = "taskfinder";
          rev = "v${version}";
          hash = "sha256-3au73LYgr3ajLBFeVPibOycEMCgs37hrazMsn37VeA0="; 
        };

        # Prepend `pkgs.` to rustPlatform when removing fenix
        package = rustPlatform.buildRustPackage {
          inherit pname version src;

          cargoHash = "sha256-DAXT03kXPoLHqJJWAVXOpH0wHOdq5PY2vIo5KNBGogk=";

          useFetchCargoVendor = true;

          # catch-22. The build fails because the tests fails, the tests fails because the build fails (and doesn't build to cwd)
          doCheck = false;

          meta = {
            description = "A terminal user interface that extracts and displays tasks from plain text files, hooking into your default terminal-based editor for editing";
            homepage = "https://codeberg.org/kdwarn/taskfinder";
            license = lib.licenses.agpl3Plus;
            mainProgram = "tf";
            platforms = lib.platforms.unix;
            # maintainers = with lib.maintainers; [ Ginner ];
          };
        };
      in
      {
        packages.default = package;

        apps.default = flake-utils.lib.mkApp {
          drv = package;
          name = "tf";
        };

        overlays.default = final: prev: {
          taskfinder = package;
        };
      }
    );
}