3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/neatvnc/default.nix
Michael Weiss c1e77269cf
neatvnc: Disable the CPU acceleration by default
For Nixpkgs it seems best to disable the usage of CPU extensions by
default as older CPUs don't support them which will result in a crash at
runtime (SIGILL: Illegal instruction) [0].
The performance on my old test system was more than enough anyway
(usually ~10% CPU usage due to wayvnc).

[0]: https://github.com/any1/neatvnc/issues/21
2020-02-29 15:32:39 +01:00

38 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, meson, pkg-config, ninja
, pixman, libuv, gnutls, libdrm
# libjpeg_turbo: Optional, for tight encoding (disabled because experimental)
, enableCpuAcceleration ? false # Whether to use CPU extensions (e.g. AVX)
}:
stdenv.mkDerivation rec {
pname = "neatvnc";
version = "0.1.0";
src = fetchFromGitHub {
owner = "any1";
repo = pname;
rev = "v${version}";
sha256 = "04wcpwxlcf0bczcs97j21346mn6finfj7xgc2dsrwrw9xq8qa7wc";
};
nativeBuildInputs = [ meson pkg-config ninja ];
buildInputs = [ pixman libuv gnutls libdrm ];
patches = stdenv.lib.optional (!enableCpuAcceleration) ./disable-cpu-acceleration.patch;
meta = with stdenv.lib; {
description = "A VNC server library";
longDescription = ''
This is a liberally licensed VNC server library that's intended to be
fast and neat. Goals:
- Speed
- Clean interface
- Interoperability with the Freedesktop.org ecosystem
'';
inherit (src.meta) homepage;
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ];
};
}