{ stdenv, fetchFromGitHub, lib }:

stdenv.mkDerivation rec {
  pname = "windows-xp-gtk-theme";
  version = "3.1";

  src = fetchFromGitHub {
    owner = "B00merang-Project";
    repo = "Windows-XP";
    rev = version;
    sha256 = "sha256-VVNYf2jTa5lqL6RvKT7Hq2NqwUHpdqvjhMCjY3h6Hjs=";
  };

  installPhase = ''
    runHook preInstall
    mkdir -p $out/share/themes
    rm README.md LICENSE.md
    cp -r * $out/share/themes/
    runHook postInstall
  '';

  meta = with lib; {
    description = "Windows-XP like GTK theme";
    homepage = "https://github.com/B00merang-Project/Windows-XP";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
  };
}

