anchor.diff:  { lib
  -, alsa-lib
   , fetchzip
   , libXxf86vm
   , makeWrapper
  +, openal
   , openjdk
   , stdenv
   , xorg
   , copyDesktopItems
   , makeDesktopItem
  +, writeScript
   }:
   
   stdenv.mkDerivation rec {
     pname = "starsector";
  -  version = "0.95.1a-RC5";
  +  version = "0.95.1a-RC6";
   
     src = fetchzip {
       url = "https://s3.amazonaws.com/fractalsoftworks/starsector/starsector_linux-${version}.zip";
  -    sha256 = "sha256-V8/WQPvPIrF3Tg7JVO+GfeYqWhkWWrnHSVcFXGQqDAA=";
  +    sha256 = "sha256-+0zGJHM+SMonx3sytCQNQA/QBgzdPMEfQvOjrCDSOs8=";
     };
   
  -  nativeBuildInputs = [
  -    copyDesktopItems
  -    makeWrapper
  -  ];
  -  buildInputs = with xorg; [
  -    alsa-lib
  -    libXxf86vm
  -  ];
  +  nativeBuildInputs = [ copyDesktopItems makeWrapper ];
  +  buildInputs = [ xorg.libXxf86vm openal ];
   
     dontBuild = true;
   
  
positive.code:     runHook preInstall
  
      mkdir -p $out/bin
      rm -r jre_linux # remove jre7
      rm starfarer.api.zip
      cp -r ./* $out
  
  
negative.code: 
    # it tries to run everything with relative paths, which makes it CWD dependent
    # also point mod, screenshot, and save directory to $XDG_DATA_HOME
    # additionally, add some GC options to improve performance of the game
    postPatch = ''
      substituteInPlace starsector.sh \
        --replace "./jre_linux/bin/java" "${openjdk}/bin/java" \
        --replace "./native/linux" "$out/native/linux" \
        --replace "=." "=\''${XDG_DATA_HOME:-\$HOME/.local/share}/starsector" \
        --replace "-XX:+CompilerThreadHintNoPreempt" "-XX:+UnlockDiagnosticVMOptions -XX:-BytecodeVerificationRemote -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+DisableExplicitGC"
    '';
  
    meta = with lib; {
  