Merge pull request #43494 from jb55/clipmenu-master

clipmenu: init at 5.4.0
This commit is contained in:
xeji 2018-07-16 00:48:31 +02:00 committed by GitHub
commit 311f017066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 95 additions and 0 deletions

View File

@ -320,6 +320,7 @@
./services/misc/canto-daemon.nix
./services/misc/calibre-server.nix
./services/misc/cfdyndns.nix
./services/misc/clipmenu.nix
./services/misc/cpuminer-cryptonight.nix
./services/misc/cgminer.nix
./services/misc/confd.nix

View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.clipmenu;
in {
options.services.clipmenu = {
enable = mkEnableOption "clipmenu, the clipboard management daemon";
package = mkOption {
type = types.package;
default = pkgs.clipmenu;
defaultText = "pkgs.clipmenu";
description = "clipmenu derivation to use.";
};
};
config = mkIf cfg.enable {
systemd.user.services.clipmenu = {
enable = true;
description = "Clipboard management daemon";
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/clipmenud";
};
environment.systemPackages = [ cfg.package ];
};
}

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -5907,6 +5907,8 @@ with pkgs;
gccCross = pkgsCross.ben-nanonote.buildPackages.gccCrossStageStatic;
};
clipnotify = callPackage ../tools/misc/clipnotify { };
xclip = callPackage ../tools/misc/xclip { };
xcwd = callPackage ../tools/X11/xcwd { };
@ -15475,6 +15477,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 { };