Unverified Commit 778a1f2c authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #306787 from Guanran928/fcitx5-themes

parents eecacc43 78d7179c
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  unstableGitUpdater,
}:
stdenvNoCC.mkDerivation {
  pname = "fcitx5-catppuccin";
  version = "0-unstable-2022-10-05";

  src = fetchFromGitHub {
    owner = "catppuccin";
    repo = "fcitx5";
    rev = "ce244cfdf43a648d984719fdfd1d60aab09f5c97";
    hash = "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=";
  };

  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/fcitx5/themes
    cp -r src/catppuccin-* $out/share/fcitx5/themes

    runHook postInstall
  '';

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Soothing pastel theme for Fcitx5";
    homepage = "https://github.com/catppuccin/fcitx5";
    license = licenses.mit;
    maintainers = with maintainers; [ Guanran928 ];
    platforms = platforms.all;
  };
}
+44 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  unstableGitUpdater,
}:
stdenvNoCC.mkDerivation {
  pname = "fcitx5-tokyonight";
  version = "0-unstable-2024-01-28";

  src = fetchFromGitHub {
    owner = "ch3n9w";
    repo = "fcitx5-Tokyonight";
    rev = "f7454ab387d6b071ee12ff7ee819f0c7030fdf2c";
    hash = "sha256-swOy0kDZUdqtC2sPSZEBLnHSs8dpQ/QfFMObI6BARfo=";
  };

  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall

    install -Dm644 Tokyonight-Day/{arrow.png,panel.png,radio.png} -t $out/share/fcitx5-tokyonight/
    for _variant in Tokyonight-Day Tokyonight-Storm; do
      mkdir -p $out/share/fcitx5/themes/$_variant/
      ln -s $out/share/fcitx5-tokyonight/arrow.png $out/share/fcitx5/themes/$_variant/arrow.png
      ln -s $out/share/fcitx5-tokyonight/radio.png $out/share/fcitx5/themes/$_variant/radio.png
      install -Dm644 $_variant/theme.conf $out/share/fcitx5/themes/$_variant/theme.conf
    done

    runHook postInstall
  '';

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Fcitx5 theme based on Tokyo Night color";
    homepage = "https://github.com/ch3n9w/fcitx5-Tokyonight";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ Guanran928 ];
    platforms = platforms.all;
  };
}