depot/pkgs/development/libraries/libvncserver/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

63 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, libjpeg
, openssl
, zlib
, libgcrypt
, libpng
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
, systemd
, Carbon
}:
stdenv.mkDerivation rec {
pname = "libvncserver";
version = "0.9.14";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "LibVNC";
repo = "libvncserver";
rev = "LibVNCServer-${version}";
sha256 = "sha256-kqVZeCTp+Z6BtB6nzkwmtkJ4wtmjlSQBg05lD02cVvQ=";
};
patches = [
# fix generated pkg-config files
./pkgconfig.patch
];
nativeBuildInputs = [
cmake
];
cmakeFlags = [
"-DWITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
];
buildInputs = [
libjpeg
openssl
libgcrypt
libpng
] ++ lib.optionals withSystemd [
systemd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon
];
propagatedBuildInputs = [
zlib
];
meta = with lib; {
description = "VNC server library";
homepage = "https://libvnc.github.io/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
};
}