{
  buildHomeAssistantComponent,
  fetchFromGitHub,
  pkgs,
  namespace,
  ...
}:
buildHomeAssistantComponent rec {
  owner = "Wouter0100";
  domain = "nanokvm";
  version = "v0.0.4";

  src = fetchFromGitHub {
    owner = owner;
    repo = "homeassistant-nanokvm";
    rev = "d52fac6add2c750e3d824b736e10ebf929329494";
    hash = "sha256-pyGGYFzz7lTTffpnWdjXcFDDQgrwAfMzBL/hAFTwLmQ=";
  };

  propagatedBuildInputs = [
    pkgs.${namespace}.python-nanokvm
  ];

  postPatch = ''
    substituteInPlace custom_components/nanokvm/manifest.json \
      --replace-fail '"nanokvm>=0.0.4"' '"nanokvm"'
  '';

  meta = {
    changelog = "https://github.com/Wouter0100/homeassistant-nanokvm/releases/tag/${version}";
    description = "This integration allows you to control and monitor your Sipeed NanoKVM device from Home Assistant.";
    homepage = "https://github.com/Wouter0100/homeassistant-nanokvm";
    maintainers = [ ];
  };
}
