diff options
author | xeji <36407913+xeji@users.noreply.github.com> | 2018-07-16 00:48:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 00:48:31 +0200 |
commit | 311f017066a1fe0762cba6c036e8ce82c2e02362 (patch) | |
tree | 5678171edad5ce5c00513ec32033ad394da12616 | |
parent | ed23255c5a26a2f1bdd6f0cc12fe10c69558cea2 (diff) | |
parent | 6c1eb15a3b6c64f01544ce1ccfc866efaf6f40b9 (diff) | |
download | nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar.gz nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar.bz2 nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar.lz nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar.xz nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.tar.zst nixlib-311f017066a1fe0762cba6c036e8ce82c2e02362.zip |
Merge pull request #43494 from jb55/clipmenu-master
clipmenu: init at 5.4.0
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/misc/clipmenu.nix | 31 | ||||
-rw-r--r-- | pkgs/applications/misc/clipmenu/default.nix | 33 | ||||
-rw-r--r-- | pkgs/tools/misc/clipnotify/default.nix | 26 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
5 files changed, 95 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 988693d924bf..cf30fc693fc7 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/services/misc/clipmenu.nix b/nixos/modules/services/misc/clipmenu.nix new file mode 100644 index 000000000000..3ba050044cac --- /dev/null +++ b/nixos/modules/services/misc/clipmenu.nix @@ -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 ]; + }; +} 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 cc216ac311c9..7e58f106d69a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |