{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  name = "kobopatch";
  version = "0.15.0";

  vendorSha256 = "1i6srhyig4x8mywyc2l8wzzm1afvb7wxmjsr84c447sb1xss6p7x";

  src = fetchFromGitHub {
    owner = "geek1011";
    repo = "kobopatch";
    rev = "653070c67c83ec61884854efc4f8a3132d82a2e5";
    sha256 = "09hr3zh0w0f78cx40d2yydqv0mmjdh4iwdgia7sikraphvha85nn";
  };

  meta = with lib; {
    description = "A patch maker for kobo eReader devices.";
    homepage = "https://github.com/geek1011/kobopatch";
    license = licenses.mit;
    platforms = platforms.linux ++ platforms.darwin;
  };
}
