1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/pkgs/tools/X11/virtualgl/lib.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, cmake
, libGL, libGLU, libX11, libXv, libXtst, libjpeg_turbo, fltk
, xorg
, opencl-headers, opencl-clhpp, ocl-icd
}:
stdenv.mkDerivation rec {
pname = "virtualgl-lib";
version = "2.6.5";
src = fetchurl {
url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
sha256 = "1giin3jmcs6y616bb44bpz30frsmj9f8pz2vg7jvb9vcfc9456rr";
};
cmakeFlags = [ "-DVGL_SYSTEMFLTK=1" "-DTJPEG_LIBRARY=${libjpeg_turbo.out}/lib/libturbojpeg.so" ];
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ libjpeg_turbo libGL libGLU fltk
libX11 libXv libXtst xorg.xcbutilkeysyms
opencl-headers opencl-clhpp ocl-icd
];
fixupPhase = ''
substituteInPlace $out/bin/vglrun \
--replace "LD_PRELOAD=libvglfaker" "LD_PRELOAD=$out/lib/libvglfaker" \
--replace "LD_PRELOAD=libdlfaker" "LD_PRELOAD=$out/lib/libdlfaker" \
--replace "LD_PRELOAD=libgefaker" "LD_PRELOAD=$out/lib/libgefaker"
'';
meta = with lib; {
homepage = "http://www.virtualgl.org/";
description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
license = licenses.wxWindows;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
}