{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  name = "koboutils";
  version = "git_2020-04-08";

  vendorSha256 = "1hqvizvbc29yib6awmvlklxkq7j8c0d32gxsipdiwhkh79xbd6wq";
  deleteVendor = true;

  src = fetchFromGitHub {
    owner = "geek1011";
    repo = "koboutils";
    rev = "50024f2afc6b20205a273ffcbb72c934b80bba96";
    sha256 = "0zpmjya13wbmpxbwrpbvw7d2rb040wmc09djhnn6dszlqpflwxmy";
  };

  meta = with lib; {
    description = "Various utilities for Kobo eReaders";
    homepage = "https://github.com/geek1011/koboutils";
    license = licenses.mit;
    platforms = platforms.linux ++ platforms.darwin;
  };
}
