biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / misc / barrier / default.nix
blobd02712848b72a44e28ad5026005b1ecc13866cd2
1 { lib, fetchFromGitHub, cmake, curl, xorg, avahi, qtbase, mkDerivation,
2   openssl, wrapGAppsHook,
3   avahiWithLibdnssdCompat ? avahi.override { withLibdnssdCompat = true; },
4   fetchpatch
5 }:
7 mkDerivation rec {
8   pname = "barrier";
9   version = "2.4.0";
11   src = fetchFromGitHub {
12     owner = "debauchee";
13     repo = pname;
14     rev = "v${version}";
15     sha256 = "sha256-2tHqLF3zS3C4UnOVIZfpcuzaemC9++nC7lXgFnFSfKU=";
16     fetchSubmodules = true;
17   };
19   patches = [
20     # This patch can be removed when a new version of barrier (greater than 2.4.0)
21     # is released, which will contain this commit.
22     (fetchpatch {
23       name = "add-missing-cstddef-header.patch";
24       url = "https://github.com/debauchee/barrier/commit/4b12265ae5d324b942698a3177e1d8b1749414d7.patch";
25       sha256 = "sha256-ajMxP7szBFi4h8cMT3qswfa3k/QiJ1FGI3q9fkCFQQk=";
26     })
27   ];
29   CXXFLAGS = [
30     # error: 'uint8_t' is not a member of 'std'; did you mean 'wint_t'?
31     "-include cstdint"
32   ];
34   buildInputs = [ curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat qtbase ];
35   nativeBuildInputs = [ cmake wrapGAppsHook ];
37   postFixup = ''
38     substituteInPlace "$out/share/applications/barrier.desktop" --replace "Exec=barrier" "Exec=$out/bin/barrier"
39   '';
41   qtWrapperArgs = [
42     ''--prefix PATH : ${lib.makeBinPath [ openssl ]}''
43   ];
45   meta = {
46     description = "Open-source KVM software";
47     longDescription = ''
48       Barrier is KVM software forked from Symless's synergy 1.9 codebase.
49       Synergy was a commercialized reimplementation of the original
50       CosmoSynergy written by Chris Schoeneman.
51     '';
52     homepage = "https://github.com/debauchee/barrier";
53     downloadPage = "https://github.com/debauchee/barrier/releases";
54     license = lib.licenses.gpl2;
55     maintainers = [ lib.maintainers.phryneas ];
56     platforms = lib.platforms.linux;
57     mainProgram = "barrier";
58   };