2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jq,
|
|
|
|
wofi,
|
|
|
|
wtype,
|
|
|
|
wl-clipboard,
|
|
|
|
}:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
let
|
|
|
|
emojiJSON = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/muan/emojilib/v3.0.11/dist/emoji-en-US.json";
|
|
|
|
hash = "sha256-WHqCSNgDzc6ZASdVrwPvsU4MtBcYLKDp2D2Hykrq1sI=";
|
|
|
|
};
|
2022-08-21 13:32:41 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-17 21:14:59 +00:00
|
|
|
pname = "wofi-emoji";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.0.0";
|
2021-07-17 21:14:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-10-09 19:29:22 +00:00
|
|
|
owner = "Zeioth";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "wofi-emoji";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-wLZK7RcDxxlYuu27WNj+SoRoBiCqk9whp4Fyg0SOoPA=";
|
2021-07-17 21:14:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ jq ];
|
2024-05-15 15:35:15 +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
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2021-07-17 21:14:59 +00:00
|
|
|
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";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ johnrtitor ymarkus ];
|
|
|
|
platforms = lib.platforms.all;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "wofi-emoji";
|
2021-07-17 21:14:59 +00:00
|
|
|
};
|
|
|
|
}
|