about summary refs log tree commit diff
path: root/pkgs/tools/misc/parcellite/default.nix
blob: 3c53be706641bf42ff740f10a27571a145482089 (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
{ lib, stdenv, fetchFromGitHub, autoreconfHook
, gtk2, hicolor-icon-theme, intltool, pkg-config
, which, wrapGAppsHook3, xdotool, libappindicator-gtk2 }:

stdenv.mkDerivation rec {
  pname = "parcellite";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "rickyrockrat";
    repo = "parcellite";
    rev = version;
    sha256 = "19q4x6x984s6gxk1wpzaxawgvly5vnihivrhmja2kcxhzqrnfhiy";
  };

  nativeBuildInputs = [ autoreconfHook intltool pkg-config wrapGAppsHook3 ];
  buildInputs = [ gtk2 hicolor-icon-theme libappindicator-gtk2 ];
  NIX_LDFLAGS = "-lgio-2.0";

  preFixup = ''
    # Need which and xdotool on path to fix auto-pasting.
    gappsWrapperArgs+=(--prefix PATH : "${which}/bin:${xdotool}/bin")
  '';

  meta = with lib; {
    description = "Lightweight GTK clipboard manager";
    homepage = "https://github.com/rickyrockrat/parcellite";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    mainProgram = "parcellite";
  };
}