anchor.diff:      homepage  = https://www.openspaceproject.com/;
       license   = stdenv.lib.licenses.mit;
       platforms = stdenv.lib.platforms.linux;
  +    broken = true; # fails to build
     };
   }
  
positive.code:     sha256 = "0msqixf30r0d41xmfmzkdfw6w9jkx2ph5clq8xiwrg1jc3z9q7nv";
      fetchSubmodules = true;
    };
    
    buildInputs = [
      makeWrapper cmake
      curl boost gdal glew soil
      libX11 libXi libXxf86vm libXcursor libXrandr libXinerama
    ];
        
    glmPlatformH = fetchurl {
      url    = "https://raw.githubusercontent.com/g-truc/glm/dd48b56e44d699a022c69155c8672caacafd9e8a/glm/simd/platform.h";
      sha256 = "0y91hlbgn5va7ijg5mz823gqkq9hqxl00lwmdwnf8q2g086rplzw";
    };
    
    # See <https://github.com/g-truc/glm/issues/726>
    prePatch = ''
      cp ${glmPlatformH} ext/sgct/include/glm/simd/platform.h
      cp ${glmPlatformH} ext/ghoul/ext/glm/glm/simd/platform.h
    '';
    
    patches = [
      # See <https://github.com/opensgct/sgct/issues/13>
      ./vrpn.patch
      
      ./constexpr.patch
      ./config.patch
  
      # WARNING: This patch disables some slow torrents in a very dirty way.
      ./assets.patch 
    ];
    
    bundle = "$out/usr/share/openspace";
    
    preConfigure = ''
      cmakeFlagsArray=(
        $cmakeFlagsArray
  
negative.code: stdenv.mkDerivation rec {
    version = "0.11.1";
    name    = "openspace-${version}";
  
    src = fetchFromGitHub {
      owner  = "OpenSpace";
      repo   = "OpenSpace";
  