mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
2258b21e4b
Build-tested on x86_64 Linux and on Darwin.
24 lines
496 B
Nix
24 lines
496 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 = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|