about summary refs log tree commit diff
path: root/pkgs/tools/wayland/clipman/default.nix
blob: a00c9cc58dec6f5b0e00692cd8c4d41642c0bd46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ buildGoModule
, fetchFromGitHub
, lib
, wl-clipboard
, makeWrapper
, installShellFiles
}:

buildGoModule rec {
  pname = "clipman";
  version = "1.6.4";

  src = fetchFromGitHub {
    owner = "chmouel";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-kuW74iUVLfIUWf3gaKM7IuMU1nfpU9SbSsfeZDbYGhY=";
  };

  vendorHash = "sha256-I1RWyjyOfppGi+Z5nvAei5zEvl0eQctcH8NP0MYSTbg=";

  outputs = [ "out" "man" ];

  doCheck = false;

  nativeBuildInputs = [ makeWrapper installShellFiles ];

  postInstall = ''
    wrapProgram $out/bin/clipman \
      --prefix PATH : ${lib.makeBinPath [ wl-clipboard ]}
    installManPage docs/*.1
  '';

  meta = with lib; {
    homepage = "https://github.com/chmouel/clipman";
    description = "A simple clipboard manager for Wayland";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ ma27 ];
    platforms = platforms.linux;
    mainProgram = "clipman";
  };
}