btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / gt / gtkclipblock / package.nix
bloba2489aed3990bf6c0e372467d0f0e662b932619d
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , meson
5 , cmake
6 , ninja
7 , pkg-config
8 , gtk2
9 , gtk3
10 , gtk4
13 let
14   distorm-src = fetchFromGitHub {
15     owner = "gdabah";
16     repo = "distorm";
17     rev = "3.5.2b";
18     hash = "sha256-2ftEV3TMS3HT7f96k+Pwt3Mm31fVEXcHpcbbz05jycU=";
19   };
20   pname = "gtkclipblock";
21   version = "0.2.2";
23   src = fetchFromGitHub {
24     owner = "notpeelz";
25     repo = "gtkclipblock";
26     rev = "v${version}";
27     hash = "sha256-ok/D7M0KekN8zf8AzhcOLtedbYVRHHv3m9zEHsJfcPM=";
28     fetchSubmodules = true;
29   };
31 stdenv.mkDerivation {
32   inherit pname version src;
34   nativeBuildInputs = [ meson cmake ninja pkg-config ];
36   buildInputs = [ gtk2 gtk3 gtk4 ];
38   postPatch = ''
39     substituteInPlace subprojects/funchook-helper/subprojects/funchook/CMakeLists.txt \
40       --replace "GIT_REPOSITORY https://github.com/gdabah/distorm.git" "SOURCE_DIR ${distorm-src}"
41   '';
43   dontUseCmakeConfigure = true;
45   meta = with lib; {
46     description = "LD_PRELOAD hack to prevent GTK programs from interacting with the primary clipboard";
47     license = licenses.lgpl3Only;
48     maintainers = with maintainers; [ uartman ];
49     platforms = [ "x86_64-linux" ];
50   };