forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / libvncserver / default.nix
blobe6b5bf4acb5b6ab8c22bfd549951f1bf2d4bb654
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , libjpeg
6 , openssl
7 , zlib
8 , libgcrypt
9 , libpng
10 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
11 , systemd
12 , Carbon
15 stdenv.mkDerivation rec {
16   pname = "libvncserver";
17   version = "0.9.14";
19   outputs = [ "out" "dev" ];
21   src = fetchFromGitHub {
22     owner = "LibVNC";
23     repo = "libvncserver";
24     rev = "LibVNCServer-${version}";
25     sha256 = "sha256-kqVZeCTp+Z6BtB6nzkwmtkJ4wtmjlSQBg05lD02cVvQ=";
26   };
28   patches = [
29     # fix generated pkg-config files
30     ./pkgconfig.patch
31   ];
33   nativeBuildInputs = [
34     cmake
35   ];
37   cmakeFlags = [
38     "-DWITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
39   ];
41   buildInputs = [
42     libjpeg
43     openssl
44     libgcrypt
45     libpng
46   ] ++ lib.optionals withSystemd [
47     systemd
48   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
49     Carbon
50   ];
52   propagatedBuildInputs = [
53     zlib
54   ];
56   meta = with lib; {
57     description = "VNC server library";
58     homepage = "https://libvnc.github.io/";
59     license = licenses.gpl2Plus;
60     maintainers = with maintainers; [ raskin ];
61     platforms = platforms.unix;
62   };