nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 makeWrapper,
6
7 autoreconfHook,
8 pkg-config,
9
10 waylandSupport ? true,
11 x11Support ? true,
12
13 cairo,
14 glib,
15 libnotify,
16 rofi-unwrapped,
17 wl-clipboard,
18 xclip,
19 xdotool,
20 wtype,
21}:
22
23import ./versions.nix (
24 {
25 version,
26 hash,
27 patches,
28 }:
29 stdenv.mkDerivation rec {
30 pname = "rofi-emoji";
31 inherit version;
32
33 src = fetchFromGitHub {
34 owner = "Mange";
35 repo = "rofi-emoji";
36 rev = "v${version}";
37 inherit hash;
38 };
39
40 inherit patches;
41
42 postPatch = ''
43 patchShebangs clipboard-adapter.sh
44 '';
45
46 postFixup = ''
47 chmod +x $out/share/rofi-emoji/clipboard-adapter.sh
48 wrapProgram $out/share/rofi-emoji/clipboard-adapter.sh \
49 --prefix PATH ":" ${
50 lib.makeBinPath (
51 [ libnotify ]
52 ++ lib.optionals waylandSupport [
53 wl-clipboard
54 wtype
55 ]
56 ++ lib.optionals x11Support [
57 xclip
58 xdotool
59 ]
60 )
61 }
62 '';
63
64 nativeBuildInputs = [
65 autoreconfHook
66 pkg-config
67 makeWrapper
68 ];
69
70 buildInputs = [
71 cairo
72 glib
73 libnotify
74 rofi-unwrapped
75 ]
76 ++ lib.optionals waylandSupport [
77 wl-clipboard
78 wtype
79 ]
80 ++ lib.optionals x11Support [ xclip ];
81
82 meta = with lib; {
83 description = "Emoji selector plugin for Rofi (built against ${rofi-unwrapped.pname})";
84 homepage = "https://github.com/Mange/rofi-emoji";
85 license = licenses.mit;
86 maintainers = with maintainers; [
87 cole-h
88 Mange
89 ];
90 platforms = platforms.linux;
91 };
92 }
93)