opengl: Update for newer libglvndr setup
This commit is contained in:
@@ -26,7 +26,7 @@ self: super: pkgs: with pkgs; {
|
||||
|
||||
minia = callPackage ./minia.nix { };
|
||||
|
||||
inherit (callPackage ./opengl/default.nix { inherit super; }) mesa_noglu;
|
||||
inherit (callPackage ./opengl/default.nix { inherit super; }) libGL;
|
||||
|
||||
inherit (callPackages ./octopus/octopus.nix { stdenv = overrideCC stdenv gcc5; gfortran = gfortran5; }) octopus72;
|
||||
octopus7 = octopus72;
|
||||
|
||||
@@ -8,18 +8,19 @@
|
||||
let
|
||||
autoVirtualGLHook =
|
||||
let
|
||||
mesa_noglu = super.mesa_noglu;
|
||||
mesa_glu = super.mesa_glu.override { inherit mesa_noglu; };
|
||||
mesa = buildEnv {
|
||||
name = "mesa-${mesa_noglu.version}";
|
||||
paths = [ mesa_noglu.dev mesa_noglu.out mesa_glu mesa_glu.dev ];
|
||||
meta = {
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
};
|
||||
libGL = mesa_noglu;
|
||||
libGLU = mesa_glu;
|
||||
libGLU_combined = mesa;
|
||||
# Ugliness required to break the loop created by the fact that
|
||||
# the libGL hook requires VirtualGL which requires libGL.
|
||||
#
|
||||
# This would be clean if super was closed on itself (nixpkgs #15280)
|
||||
|
||||
libGL = super.libGL;
|
||||
libGLU = super.libGLU.override { inherit libGL; };
|
||||
libGLU_combined = (buildEnv {
|
||||
name = "libGLU-combined";
|
||||
paths = [ libGL libGLU ];
|
||||
extraOutputsToInstall = [ "dev" ];
|
||||
});
|
||||
|
||||
virtualglLib = (super.virtualglLib.override { inherit libGLU_combined fltk; });
|
||||
fltk = super.fltk.override { inherit libGLU_combined freeglut; };
|
||||
freeglut = super.freeglut.override { inherit libGL libGLU; };
|
||||
@@ -31,7 +32,11 @@ let
|
||||
} ./insert-virtualgl.sh;
|
||||
|
||||
in {
|
||||
mesa_noglu = super.mesa_noglu.overrideAttrs ( attrs: {
|
||||
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ autoVirtualGLHook ];
|
||||
libGL = super.libGL.overrideAttrs ( attrs: {
|
||||
# Done as a non-standard build command, so have to add it in this way
|
||||
|
||||
buildCommand = attrs.buildCommand + ''
|
||||
echo '${autoVirtualGLHook}' >> $dev/nix-support/propagated-build-inputs
|
||||
'';
|
||||
} );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user