nixpkgs/pkgs/by-name/un/unipicker/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

48 lines
1.1 KiB
Nix

{
stdenv,
fetchFromGitHub,
lib,
fzf,
xclip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "unipicker";
version = "2.0.1";
src = fetchFromGitHub {
owner = "jeremija";
repo = "unipicker";
rev = "v${finalAttrs.version}";
hash = "sha256-Br9nCK5eWoSN1i4LM2F31B62L9vuN5KzjS9pC9lq9oM=";
};
buildInputs = [
fzf
xclip
];
preInstall = ''
substituteInPlace unipicker \
--replace-fail "/etc/unipickerrc" "$out/etc/unipickerrc" \
--replace-fail "fzf" "${fzf}/bin/fzf"
substituteInPlace unipickerrc \
--replace-fail "/usr/local" "$out" \
--replace-fail "fzf" "${fzf}/bin/fzf"
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"DESTDIR=${placeholder "out"}"
];
meta = {
description = "CLI utility for searching unicode characters by description and optionally copying them to clipboard";
homepage = "https://github.com/jeremija/unipicker";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sigmanificient ];
platforms = lib.platforms.unix;
mainProgram = "unipicker";
};
})