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