9 , emojipick-use-rofi ? false
10 , emojipick-copy-to-clipboard ? true
11 , emojipick-show-notifications ? true
12 , emojipick-print-emoji ? true
13 , emojipick-font-family ? "Noto Color Emoji"
14 , emojipick-font-size ? "18"
18 boolToInt = b: if b then "1" else "0"; # Convert boolean to integer string
20 stdenvNoCC.mkDerivation {
22 version = "2021-01-27";
24 src = fetchFromGitHub {
25 owner = "thingsiplay";
28 sha256 = "1kib3cyx6z9v9qw6yrfx5sklanpk5jbxjc317wi7i7ljrg0vdazp";
35 # notify-send has to be patched in a bash file
37 substituteInPlace emojipick \
38 --replace "use_rofi=0" "use_rofi=${boolToInt emojipick-use-rofi}" \
39 --replace "copy_to_clipboard=1" "copy_to_clipboard=${boolToInt emojipick-copy-to-clipboard}" \
40 --replace "show_notification=1" "show_notification=${boolToInt emojipick-show-notifications}" \
41 --replace "print_emoji=1" "print_emoji=${boolToInt emojipick-print-emoji}" \
42 --replace "font_family='\"Noto Color Emoji\"'" "font_family='\"${emojipick-font-family}\"'" \
43 --replace 'font_size="18"' 'font_size="${emojipick-font-size}"' \
44 ${lib.optionalString emojipick-use-rofi "--replace 'rofi ' '${rofi}/bin/rofi '"} \
45 --replace notify-send ${libnotify}/bin/notify-send
52 ] ++ (if emojipick-use-rofi then [rofi] else [dmenu]);
58 cp ./emojipick $out/bin
59 cp ./emojiget.py $out/bin
65 description = "Get a selection of emojis with dmenu or rofi";
66 homepage = "https://github.com/thingsiplay/emojipick";
67 license = licenses.mit;
68 maintainers = with maintainers; [ alexnortung ];
69 platforms = platforms.linux;