unipicker: modernize, migrate to by-name

unipicker: remove from top-level
This commit is contained in:
Sigmanificient 2024-05-15 05:38:30 +02:00
parent c22e92dfe1
commit 60a9d5f477
3 changed files with 47 additions and 43 deletions

View File

@ -1,41 +0,0 @@
{ stdenv, fetchFromGitHub, lib, fzf, xclip }:
stdenv.mkDerivation rec {
pname = "unipicker";
version = "2.0.1";
src = fetchFromGitHub {
owner = "jeremija";
repo = pname;
rev = "v${version}";
sha256 = "1k4v53pm3xivwg9vq2kndpcmah0yn4679r5jzxvg38bbkfdk86c1";
};
buildInputs = [
fzf
xclip
];
preInstall = ''
substituteInPlace unipicker \
--replace "/etc/unipickerrc" "$out/etc/unipickerrc" \
--replace "fzf" "${fzf}/bin/fzf"
substituteInPlace unipickerrc \
--replace "/usr/local" "$out" \
--replace "fzf" "${fzf}/bin/fzf"
'';
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;
maintainers = with maintainers; [ sigmanificient ];
platforms = platforms.unix;
mainProgram = "unipicker";
};
}

View File

@ -0,0 +1,47 @@
{
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 = "A 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";
};
})

View File

@ -35067,8 +35067,6 @@ with pkgs;
unigine-superposition = libsForQt5.callPackage ../applications/graphics/unigine-superposition { };
unipicker = callPackage ../applications/misc/unipicker { };
unpaper = callPackage ../tools/graphics/unpaper { };
unison-ucm = callPackage ../development/compilers/unison { };