pkgs: Add package for cliphist

This commit is contained in:
ulic-youthlic 2025-06-10 15:54:54 +08:00
parent d1c2006e24
commit dcbba5b66e
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 79 additions and 0 deletions

35
pkgs/cliphist.nix Normal file
View file

@ -0,0 +1,35 @@
{
srcs,
cliphist,
imagemagick,
wl-clipboard,
fuzzel,
gawk,
gnugrep,
lib,
makeWrapper,
}: let
inherit (srcs.cliphist) src date version;
in
cliphist.overrideAttrs (final: prev: {
inherit src;
version = "unstable-${date}-git${version}";
vendorHash = "sha256-No8d9ztepBO+fgF2XkEf/tyCPDAD57rBkzA8iVyNUmw=";
buildInputs =
(prev.buildInputs or [])
++ [
makeWrapper
];
postInstall = ''
cp -t $out/bin/ $src/contrib/*
rm $out/bin/cliphist.service
wrapProgram $out/bin/cliphist-fuzzel-img \
--prefix PATH : ${lib.makeBinPath [
imagemagick
wl-clipboard
fuzzel
gawk
gnugrep
]}
'';
})