blob: eab1baedcac78f71e333a27eba83bdfa1c2dd76a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{ stdenv, lib, fetchurl, fetchFromGitHub, jq, wofi, wtype, wl-clipboard }:
let emojiJSON = fetchurl {
url = "https://raw.githubusercontent.com/muan/emojilib/v3.0.6/dist/emoji-en-US.json";
sha256 = "sha256-wf7zsIEbX/diLwmVvnN2Goxh2V5D3Z6nbEMSb5pSGt0=";
};
in
stdenv.mkDerivation rec {
pname = "wofi-emoji";
version = "unstable-2022-08-19";
src = fetchFromGitHub {
owner = "dln";
repo = pname;
rev = "c5ecb4f0f164aedb046f52b5eacac889609c8522";
sha256 = "1wq276bhf9x24ds13b2dwa69cjnr207p6977hr4bsnczryg609rh";
};
nativeBuildInputs = [ jq ];
buildInputs = [ wofi wtype wl-clipboard ];
postPatch = ''
substituteInPlace build.sh \
--replace 'curl ${emojiJSON.url}' 'cat ${emojiJSON}'
'';
buildPhase = ''
runHook preBuild
bash build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp wofi-emoji $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Simple emoji selector for Wayland using wofi and wl-clipboard";
homepage = "https://github.com/dln/wofi-emoji";
license = licenses.mit;
maintainers = [ maintainers.ymarkus ];
platforms = platforms.all;
};
}
|