mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
2f81c7a76a
clipmenud.service: - fix path to clipmenud clipmenud: - fix "ignore window" function by adding xdotools - add coreutils to make clipmenud fully self contained (needed for systemd service) clipctl: - fix process name, caused by wrapping clipmenud
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, clipnotify
|
|
, coreutils
|
|
, dmenu
|
|
, gawk
|
|
, util-linux
|
|
, xdotool
|
|
, xsel
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "clipmenu";
|
|
version = "6.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cdown";
|
|
repo = "clipmenu";
|
|
rev = version;
|
|
sha256 = "sha256-nvctEwyho6kl4+NXi76jT2kG7nchmI2a7mgxlgjXA5A=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i init/clipmenud.service \
|
|
-e "s,/usr/bin,$out/bin,"
|
|
'';
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
buildInputs = [ makeWrapper ];
|
|
nativeBuildInputs = [ xsel clipnotify ];
|
|
|
|
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 ]}"
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Clipboard management using dmenu";
|
|
inherit (src.meta) homepage;
|
|
maintainers = with maintainers; [ jb55 ];
|
|
license = licenses.publicDomain;
|
|
};
|
|
}
|