nixpkgs/pkgs/applications/misc/clipmenu/default.nix

36 lines
895 B
Nix
Raw Normal View History

{ clipnotify, makeWrapper, xsel, dmenu, utillinux, gawk, stdenv, fetchFromGitHub, lib }:
let
runtimePath = lib.makeBinPath [ clipnotify xsel dmenu utillinux gawk ];
in
stdenv.mkDerivation rec {
pname = "clipmenu";
2020-07-28 15:29:26 +02:00
version = "6.1.0";
src = fetchFromGitHub {
owner = "cdown";
repo = "clipmenu";
rev = version;
2020-07-28 15:29:26 +02:00
sha256 = "0ddj5xcwrdb2qvrndvhv8j6swcqc8dvv5i00pqk35rfk5mrl4hwv";
};
postPatch = ''
substituteInPlace ./Makefile --replace /usr "$out"
'';
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ xsel clipnotify ];
installPhase = ''
for bin in $out/bin/*; do
wrapProgram "$bin" --prefix PATH : "${runtimePath}"
done
'';
meta = with stdenv.lib; {
description = "Clipboard management using dmenu";
inherit (src.meta) homepage;
maintainers = with maintainers; [ jb55 ];
license = licenses.publicDomain;
};
}