opengl: Update for newer libglvndr setup

This commit is contained in:
Tyson Whitehead
2019-04-26 17:41:51 -04:00
parent adaf5a1a03
commit 91cdf647a4
2 changed files with 21 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ self: super: pkgs: with pkgs; {
minia = callPackage ./minia.nix { }; 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; inherit (callPackages ./octopus/octopus.nix { stdenv = overrideCC stdenv gcc5; gfortran = gfortran5; }) octopus72;
octopus7 = octopus72; octopus7 = octopus72;

View File

@@ -8,18 +8,19 @@
let let
autoVirtualGLHook = autoVirtualGLHook =
let let
mesa_noglu = super.mesa_noglu; # Ugliness required to break the loop created by the fact that
mesa_glu = super.mesa_glu.override { inherit mesa_noglu; }; # the libGL hook requires VirtualGL which requires libGL.
mesa = buildEnv { #
name = "mesa-${mesa_noglu.version}"; # This would be clean if super was closed on itself (nixpkgs #15280)
paths = [ mesa_noglu.dev mesa_noglu.out mesa_glu mesa_glu.dev ];
meta = { libGL = super.libGL;
platforms = lib.platforms.unix; libGLU = super.libGLU.override { inherit libGL; };
}; libGLU_combined = (buildEnv {
}; name = "libGLU-combined";
libGL = mesa_noglu; paths = [ libGL libGLU ];
libGLU = mesa_glu; extraOutputsToInstall = [ "dev" ];
libGLU_combined = mesa; });
virtualglLib = (super.virtualglLib.override { inherit libGLU_combined fltk; }); virtualglLib = (super.virtualglLib.override { inherit libGLU_combined fltk; });
fltk = super.fltk.override { inherit libGLU_combined freeglut; }; fltk = super.fltk.override { inherit libGLU_combined freeglut; };
freeglut = super.freeglut.override { inherit libGL libGLU; }; freeglut = super.freeglut.override { inherit libGL libGLU; };
@@ -31,7 +32,11 @@ let
} ./insert-virtualgl.sh; } ./insert-virtualgl.sh;
in { in {
mesa_noglu = super.mesa_noglu.overrideAttrs ( attrs: { libGL = super.libGL.overrideAttrs ( attrs: {
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ autoVirtualGLHook ]; # 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
'';
} );
} }