From fb130874fdcb8bc8ac4a67302bb122bff26bb712 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 13 Jul 2018 12:46:59 -0700 Subject: [PATCH] clipmenu: init at 5.4.0 clipmenu is a simple tool for managing you clipboard with dmenu. --- pkgs/applications/misc/clipmenu/default.nix | 33 +++++++++++++++++++++ pkgs/tools/misc/clipnotify/default.nix | 26 ++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 63 insertions(+) create mode 100644 pkgs/applications/misc/clipmenu/default.nix create mode 100644 pkgs/tools/misc/clipnotify/default.nix diff --git a/pkgs/applications/misc/clipmenu/default.nix b/pkgs/applications/misc/clipmenu/default.nix new file mode 100644 index 000000000000..679724ed0622 --- /dev/null +++ b/pkgs/applications/misc/clipmenu/default.nix @@ -0,0 +1,33 @@ +{ clipnotify, makeWrapper, xsel, dmenu2, utillinux, gawk, stdenv, fetchFromGitHub, lib }: +let + runtimePath = lib.makeBinPath [ clipnotify xsel dmenu2 utillinux gawk ]; +in +stdenv.mkDerivation rec { + name = "clipmenu-${version}"; + version = "5.4.0"; + + src = fetchFromGitHub { + owner = "cdown"; + repo = "clipmenu"; + rev = version; + sha256 = "1qbpca0wny6i222vbikfl2znn3fynhbl4100qs8v4wn27ra5p0mi"; + }; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + cp clipdel clipmenu clipmenud $out/bin + + 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; + }; +} diff --git a/pkgs/tools/misc/clipnotify/default.nix b/pkgs/tools/misc/clipnotify/default.nix new file mode 100644 index 000000000000..6bd0f8be2fa6 --- /dev/null +++ b/pkgs/tools/misc/clipnotify/default.nix @@ -0,0 +1,26 @@ +{ libX11, libXfixes, stdenv, fetchFromGitHub }: +stdenv.mkDerivation rec { + name = "clipnotify-${version}"; + version = "git-2018-02-20"; + + src = fetchFromGitHub { + owner = "cdown"; + repo = "clipnotify"; + rev = "9cb223fbe494c5b71678a9eae704c21a97e3bddd"; + sha256 = "1x9avjq0fgw0svcbw6b6873qnsqxbacls9sipmcv86xia4bxh8dn"; + }; + + buildInputs = [ libX11 libXfixes ]; + + installPhase = '' + mkdir -p $out/bin + cp clipnotify $out/bin + ''; + + meta = with stdenv.lib; { + description = "Notify on new X clipboard events"; + inherit (src.meta) homepage; + maintainers = with maintainers; [ jb55 ]; + license = licenses.publicDomain; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9880be0eec0..589e9180d3bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5905,6 +5905,8 @@ with pkgs; gccCross = pkgsCross.ben-nanonote.buildPackages.gccCrossStageStatic; }; + clipnotify = callPackage ../tools/misc/clipnotify { }; + xclip = callPackage ../tools/misc/xclip { }; xcwd = callPackage ../tools/X11/xcwd { }; @@ -15469,6 +15471,8 @@ with pkgs; clipgrab = callPackage ../applications/video/clipgrab { }; + clipmenu = callPackage ../applications/misc/clipmenu { }; + clipit = callPackage ../applications/misc/clipit { }; cloud-print-connector = callPackage ../servers/cloud-print-connector { };