2020-12-28 22:24:25 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, clipnotify
|
|
|
|
, coreutils
|
|
|
|
, dmenu
|
|
|
|
, gawk
|
|
|
|
, util-linux
|
|
|
|
, xdotool
|
|
|
|
, xsel
|
|
|
|
}:
|
2018-07-13 21:46:59 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "clipmenu";
|
2020-12-28 22:14:10 +01:00
|
|
|
version = "6.2.0";
|
2018-07-13 21:46:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cdown";
|
|
|
|
repo = "clipmenu";
|
|
|
|
rev = version;
|
2020-12-28 22:14:10 +01:00
|
|
|
sha256 = "sha256-nvctEwyho6kl4+NXi76jT2kG7nchmI2a7mgxlgjXA5A=";
|
2018-07-13 21:46:59 +02:00
|
|
|
};
|
2020-12-28 22:14:10 +01:00
|
|
|
|
2020-12-28 22:24:25 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i init/clipmenud.service \
|
|
|
|
-e "s,/usr/bin,$out/bin,"
|
|
|
|
'';
|
|
|
|
|
2020-08-01 12:26:00 +02:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2020-07-30 11:18:14 +02:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
nativeBuildInputs = [ xsel clipnotify ];
|
2018-07-13 21:46:59 +02:00
|
|
|
|
2020-12-28 22:24:25 +01:00
|
|
|
postFixup = ''
|
|
|
|
sed -i "$out/bin/clipctl" -e 's,clipmenud\$,\.clipmenud-wrapped\$,'
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/clipmenu" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ xsel ]}"
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/clipmenud" \
|
|
|
|
--set PATH "${lib.makeBinPath [ clipnotify coreutils gawk util-linux xdotool xsel ]}"
|
2018-07-13 21:46:59 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-07-13 21:46:59 +02:00
|
|
|
description = "Clipboard management using dmenu";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
maintainers = with maintainers; [ jb55 ];
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
};
|
|
|
|
}
|