From 728e65ca55b4d952bb7b6ea503b210d87f18bb97 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 14 Aug 2024 00:45:04 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'accounts/gkleen@sif/default.nix') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 2c6d747d..0fe68a55 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -971,6 +971,58 @@ in { }; "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; + "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { + inherit (sources.emoji-data) pname src; + version = lib.removePrefix "v" sources.emoji-data.version; + buildInputs = with pkgs; [ jq (ruby.withPackages (ps: with ps; [ nokogiri rspec racc rubocop rubocop-performance rspec-core rspec-expectations rspec-mocks diff-lcs parallel parser rainbow regexp_parser rubocop-ast ruby-progressbar unicode-display_width rspec-support optimist ast ])) ]; + LC_ALL = "C.UTF-8"; + patches = [ + (pkgs.writeText "nix.patch" '' + diff --git a/Makefile b/Makefile + index 896cb50..c7b6db8 100644 + --- a/Makefile + +++ b/Makefile + @@ -21,10 +21,10 @@ data: + cldr: + @[ ! -d cldr/.git ] && git submodule update --init cldr + + -data/all.json: compile.rb $(wildcard lib/*.rb) $(INPUT_FILES) | cldr data check-ruby gems + +data/all.json: compile.rb $(wildcard lib/*.rb) $(INPUT_FILES) | data + @ruby compile.rb > "$@" + + -data/%.txt: views/%.txt.jq data/all.json | data check-jq + +data/%.txt: views/%.txt.jq data/all.json | data + @jq -r -f "$<" < data/all.json > "$@" + + data/%.json: views/%.json.jq data/all.json | data check-jq + '') + ]; + postPatch = '' + cp ${pkgs.writeText "list.txt.jq" '' + .categories[] | + + # Collect category + subcategory combos + .name as $cat | + reduce .subcategories[] as $sub ( + []; + # Build an array of all emojis in this subcategory + . + ( + $sub.emojis | map( + # emoji: name (keyword, keyword, keyword) + "\(.characters): \(.name // .tts_descriptions.en // "") (\(.keywords.en // [] | join(", ")))" + ) + ) + ) | + + # Merge into a single string + join("\n") + ''} views/list.txt.jq + ''; + buildFlagsArray = ["data/list.txt"]; + installPhase = '' + cp data/list.txt $out + ''; + }; }; xdg.mimeApps = { -- cgit v1.2.3