Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 installShellFiles,
6
7 waylandSupport ? true,
8 x11Support ? true,
9
10 wl-clipboard,
11 wtype,
12 xdotool,
13 xsel,
14}:
15
16python3Packages.buildPythonApplication rec {
17 pname = "rofimoji";
18 version = "6.5.0";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "fdw";
23 repo = "rofimoji";
24 tag = version;
25 hash = "sha256-CY+ddF2Rth92R22QKqOb/Us+rZhvWTaU/jKy8fljWqQ=";
26 };
27
28 nativeBuildInputs = [
29 python3Packages.poetry-core
30 installShellFiles
31 ];
32
33 # `rofi` and the `waylandSupport` and `x11Support` dependencies
34 # contain binaries needed at runtime.
35 propagatedBuildInputs = [
36 python3Packages.configargparse
37 ]
38 ++ lib.optionals waylandSupport [
39 wl-clipboard
40 wtype
41 ]
42 ++ lib.optionals x11Support [
43 xdotool
44 xsel
45 ];
46
47 # The 'extractors' sub-module is used for development
48 # and has additional dependencies.
49 postPatch = ''
50 rm -rf extractors
51 '';
52
53 postInstall = ''
54 installManPage src/picker/docs/rofimoji.1
55 '';
56
57 meta = with lib; {
58 description = "Simple emoji and character picker for rofi";
59 mainProgram = "rofimoji";
60 homepage = "https://github.com/fdw/rofimoji";
61 changelog = "https://github.com/fdw/rofimoji/blob/${src.rev}/CHANGELOG.md";
62 license = licenses.mit;
63 platforms = platforms.linux;
64 maintainers = with maintainers; [ justinlovinger ];
65 };
66}