2022-08-21 00:25:30 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchFromGitHub, jq, wofi, wtype, wl-clipboard }:
|
|
|
|
|
|
|
|
let emojiJSON = fetchurl {
|
2023-09-05 21:13:00 +00:00
|
|
|
url = "https://raw.githubusercontent.com/muan/emojilib/v3.0.10/dist/emoji-en-US.json";
|
|
|
|
hash = "sha256-UhAB5hVp5vV2d1FjIb2TBd2FJ6OPBbiP31HGAEDQFnA=";};
|
2022-08-21 00:25:30 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-17 21:07:28 +00:00
|
|
|
pname = "wofi-emoji";
|
2024-01-17 08:37:04 +00:00
|
|
|
version = "unstable-2023-12-22";
|
2021-07-17 21:07:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-09-05 21:13:00 +00:00
|
|
|
owner = "Zeioth";
|
2021-07-17 21:07:28 +00:00
|
|
|
repo = pname;
|
2024-01-17 08:37:04 +00:00
|
|
|
rev = "2cc95880848134a3bbe0675bcb62a0dae1d0f572";
|
|
|
|
hash = "sha256-t9M8z8JxuvBDzNs98L7YTNUfTK23W1DYGdHDiXNQOgk=";
|
2021-07-17 21:07:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ jq ];
|
2022-08-21 00:25:30 +00:00
|
|
|
buildInputs = [ wofi wtype wl-clipboard ];
|
2021-07-17 21:07:28 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace build.sh \
|
2022-09-04 08:17:16 +00:00
|
|
|
--replace 'curl ${emojiJSON.url}' 'cat ${emojiJSON}'
|
2024-01-17 08:37:11 +00:00
|
|
|
substituteInPlace wofi-emoji \
|
|
|
|
--replace 'wofi' '${wofi}/bin/wofi' \
|
|
|
|
--replace 'wtype' '${wtype}/bin/wtype' \
|
|
|
|
--replace 'wl-copy' '${wl-clipboard}/bin/wl-copy'
|
2021-07-17 21:07:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2024-04-05 18:10:04 +00:00
|
|
|
homepage = "https://github.com/Zeioth/wofi-emoji";
|
2021-07-17 21:07:28 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ymarkus ];
|
|
|
|
platforms = platforms.all;
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "wofi-emoji";
|
2021-07-17 21:07:28 +00:00
|
|
|
};
|
|
|
|
}
|