2021-03-25 16:22:20 +00:00
|
|
|
{ stdenv, fetchFromGitHub, lib, fzf, xclip }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unipicker";
|
2021-04-12 21:40:47 +00:00
|
|
|
version = "2.0.1";
|
2021-03-25 16:22:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jeremija";
|
|
|
|
repo = pname;
|
2021-04-12 21:40:47 +00:00
|
|
|
rev = "v${version}";
|
2021-03-25 16:22:20 +00:00
|
|
|
sha256 = "1k4v53pm3xivwg9vq2kndpcmah0yn4679r5jzxvg38bbkfdk86c1";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fzf
|
|
|
|
xclip
|
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
2021-08-15 09:43:48 +00:00
|
|
|
substituteInPlace unipicker \
|
|
|
|
--replace "/etc/unipickerrc" "$out/etc/unipickerrc" \
|
|
|
|
--replace "fzf" "${fzf}/bin/fzf"
|
|
|
|
substituteInPlace unipickerrc \
|
|
|
|
--replace "/usr/local" "$out" \
|
|
|
|
--replace "fzf" "${fzf}/bin/fzf"
|
2021-03-25 16:22:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A CLI utility for searching unicode characters by description and optionally copying them to clipboard";
|
|
|
|
homepage = "https://github.com/jeremija/unipicker";
|
|
|
|
license = licenses.mit;
|
2022-08-21 21:50:03 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-08-15 09:43:48 +00:00
|
|
|
platforms = platforms.unix;
|
2021-03-25 16:22:20 +00:00
|
|
|
};
|
|
|
|
}
|