2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
|
|
|
|
, autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
, waylandSupport ? true
|
|
|
|
, x11Support ? true
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
, cairo
|
|
|
|
, glib
|
|
|
|
, libnotify
|
|
|
|
, rofi-unwrapped
|
|
|
|
, wl-clipboard
|
|
|
|
, xclip
|
2024-04-21 15:54:59 +00:00
|
|
|
, xdotool
|
|
|
|
, wtype
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
import ./versions.nix ({ version, hash, patches}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rofi-emoji";
|
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mange";
|
|
|
|
repo = "rofi-emoji";
|
|
|
|
rev = "v${version}";
|
|
|
|
inherit hash;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
inherit patches;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs clipboard-adapter.sh
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postFixup = ''
|
|
|
|
chmod +x $out/share/rofi-emoji/clipboard-adapter.sh
|
|
|
|
wrapProgram $out/share/rofi-emoji/clipboard-adapter.sh \
|
|
|
|
--prefix PATH ":" ${lib.makeBinPath ([ libnotify ]
|
|
|
|
++ lib.optionals waylandSupport [ wl-clipboard wtype ]
|
|
|
|
++ lib.optionals x11Support [ xclip xdotool ])}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
glib
|
|
|
|
libnotify
|
|
|
|
rofi-unwrapped
|
|
|
|
]
|
|
|
|
++ lib.optionals waylandSupport [ wl-clipboard wtype ]
|
|
|
|
++ lib.optionals x11Support [ xclip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Emoji selector plugin for Rofi (built against ${rofi-unwrapped.pname})";
|
|
|
|
homepage = "https://github.com/Mange/rofi-emoji";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cole-h Mange ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|