3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/X11/virtualgl/default.nix
2021-01-15 17:12:36 +07:00

25 lines
530 B
Nix

{ stdenv, lib
, virtualglLib
, virtualglLib_i686 ? null
}:
stdenv.mkDerivation {
name = "virtualgl-${lib.getVersion virtualglLib}";
paths = [ virtualglLib ];
buildCommand = ''
mkdir -p $out/bin
for i in ${virtualglLib}/bin/* ${virtualglLib}/bin/.vglrun*; do
ln -s "$i" $out/bin
done
'' + lib.optionalString (virtualglLib_i686 != null) ''
ln -sf ${virtualglLib_i686}/bin/.vglrun.vars32 $out/bin
'';
meta = {
platforms = lib.platforms.linux;
inherit (virtualglLib.meta) license;
};
}