{ lib, buildGoModule }:

buildGoModule rec {
  pname = "alps";
  version = "0.0.1";

  src = fetchGit {
    url = "https://git.sr.ht/~migadu/alps";
    rev = "51498a2dc37987f55b022efb961b68a282be17ed";
  };

  vendorSha256 = "0wc8fb03zlc1gl4nxlsh149gvpvrs3lc0smzrnam9smigg9gw4in";

  subPackages = [ "cmd/alps" ];

  postInstall = ''
    mkdir -p $out/share/alps
    cp -r $src/themes $out/share/alps/
  '';

  meta = with lib; {
    description = "A simple and extensible webmail.";
    homepage = "https://git.sr.ht/~migadu/alps";
  };
}
