2021-02-05 17:12:51 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, SDL2, SDL2_ttf, spice-protocol
|
2020-11-09 15:59:12 +00:00
|
|
|
|
, fontconfig, libX11, freefont_ttf, nettle, libpthreadstubs, libXau, libXdmcp
|
2021-04-22 02:08:21 +00:00
|
|
|
|
, libXi, libXext, wayland, wayland-protocols, libffi, libGLU, libXScrnSaver
|
|
|
|
|
, expat, libbfd
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "looking-glass-client";
|
2021-04-22 02:08:21 +00:00
|
|
|
|
version = "B3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "gnif";
|
|
|
|
|
repo = "LookingGlass";
|
|
|
|
|
rev = version;
|
2021-04-22 02:08:21 +00:00
|
|
|
|
sha256 = "1vmabjzn85p0brdian9lbpjq39agzn8k0limn8zjm713lh3n3c0f";
|
2020-11-09 15:59:12 +00:00
|
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-09 15:59:12 +00:00
|
|
|
|
SDL2 SDL2_ttf spice-protocol fontconfig libX11 freefont_ttf nettle
|
2021-04-22 02:08:21 +00:00
|
|
|
|
libpthreadstubs libXau libXdmcp libXi libXext wayland wayland-protocols
|
|
|
|
|
libffi libGLU libXScrnSaver expat libbfd
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
|
patches = [
|
|
|
|
|
# error: ‘h’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
|
|
|
|
# Fixed upstream in master in 8771103abbfd04da9787dea760405364af0d82de, but not in B3.
|
|
|
|
|
# Including our own patch here since upstream commit patch doesnt apply cleanly on B3
|
|
|
|
|
./0001-client-all-fix-more-maybe-uninitialized-when-O3-is-i.patch
|
|
|
|
|
];
|
|
|
|
|
patchFlags = "-p2";
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
sourceRoot = "source/client";
|
2020-11-09 15:59:12 +00:00
|
|
|
|
NIX_CFLAGS_COMPILE = "-mavx"; # Fix some sort of AVX compiler problem.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "A KVM Frame Relay (KVMFR) implementation";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Looking Glass is an open source application that allows the use of a KVM
|
|
|
|
|
(Kernel-based Virtual Machine) configured for VGA PCI Pass-through
|
|
|
|
|
without an attached physical monitor, keyboard or mouse. This is the final
|
|
|
|
|
step required to move away from dual booting with other operating systems
|
|
|
|
|
for legacy programs that require high performance graphics.
|
|
|
|
|
'';
|
2020-11-09 15:59:12 +00:00
|
|
|
|
homepage = "https://looking-glass.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.gpl2Plus;
|
2020-11-09 15:59:12 +00:00
|
|
|
|
maintainers = with maintainers; [ alexbakker ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
|
};
|
|
|
|
|
}
|