From 79df0364c37add2d2862d08c8f6f72b68453913a Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Sun, 28 Jan 2024 12:09:19 +0800 Subject: [PATCH] fcitx5-tokyonight: init at unstable-2024-01-28 im a fucking moron https://github.com/ch3n9w/fcitx5-Tokyonight/issues/1 --- pkgs/default.nix | 1 + pkgs/fcitx5-tokyonight/default.nix | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/fcitx5-tokyonight/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 151fbc8..b6e419b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,5 @@ pkgs: { + fcitx5-tokyonight = pkgs.callPackage ./fcitx5-tokyonight {}; metacubexd = pkgs.callPackage ./metacubexd {}; mpvScripts.modernx = pkgs.callPackage ./mpvScripts/modernx {}; } diff --git a/pkgs/fcitx5-tokyonight/default.nix b/pkgs/fcitx5-tokyonight/default.nix new file mode 100644 index 0000000..be1b7b2 --- /dev/null +++ b/pkgs/fcitx5-tokyonight/default.nix @@ -0,0 +1,39 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + nix-update-script, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "fcitx5-tokyonight"; + version = "unstable-2024-01-28"; + + src = fetchFromGitHub { + owner = "ch3n9w"; + repo = "fcitx5-Tokyonight"; + rev = "f7454ab387d6b071ee12ff7ee819f0c7030fdf2c"; + hash = "sha256-swOy0kDZUdqtC2sPSZEBLnHSs8dpQ/QfFMObI6BARfo="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + install -Dm644 Tokyonight-Day/{arrow.png,panel.png,radio.png} -t $out/share/${finalAttrs.pname}/ + for _variant in Tokyonight-Day Tokyonight-Storm; do + mkdir -p $out/share/fcitx5/themes/$_variant/ + ln -s $out/share/${finalAttrs.pname}/arrow.png $out/share/fcitx5/themes/$_variant/arrow.png + ln -s $out/share/${finalAttrs.pname}/radio.png $out/share/fcitx5/themes/$_variant/radio.png + install -Dm644 $_variant/theme.conf $out/share/fcitx5/themes/$_variant/theme.conf + done + ''; + + passthru.updateScript = nix-update-script {}; + + meta = with lib; { + description = "Fcitx5 theme using TokyoNight colorscheme"; + homepage = "https://github.com/ch3n9w/fcitx5-Tokyonight"; + license = licenses.gpl3; + platforms = platforms.all; + }; +})