anchor.diff:    nativeBuildInputs = [ makeWrapper cmake ];
     buildInputs = [ libjpeg zlib libpng libGL SDL2 ];
   
  +  outputs = [ "out" "openjo" "openja" ];
  +
     # move from $out/JediAcademy to $out/opt/JediAcademy
     preConfigure = ''
       cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$out/opt")
     '';
  +  cmakeFlags = ["-DBuildJK2SPEngine:BOOL=ON"
  +                "-DBuildJK2SPGame:BOOL=ON"
  +                "-DBuildJK2SPRdVanilla:BOOL=ON"];
   
     postInstall = ''
  -    mkdir -p $out/bin $out/share/applications $out/share/icons/hicolor/128x128/apps
  -    prefix=$out/opt/JediAcademy
  +    mkdir -p $out/bin $openja/bin $openjo/bin
  +    mkdir -p $openja/share/applications $openjo/share/applications
  +    mkdir -p $openja/share/icons/hicolor/128x128/apps $openjo/share/icons/hicolor/128x128/apps
  +    mkdir -p $openja/opt $openjo/opt
  +    mv $out/opt/JediAcademy $openja/opt/
  +    mv $out/opt/JediOutcast $openjo/opt/
  +    jaPrefix=$openja/opt/JediAcademy
  +    joPrefix=$openjo/opt/JediOutcast
   
  -    makeWrapper $prefix/openjk.* $out/bin/jamp --run "cd $prefix"
  -    makeWrapper $prefix/openjk_sp.* $out/bin/jasp --run "cd $prefix"
  -    makeWrapper $prefix/openjkded.* $out/bin/openjkded --run "cd $prefix"
  +    makeWrapper $jaPrefix/openjk.* $openja/bin/jamp --run "cd $jaPrefix"
  +    makeWrapper $jaPrefix/openjk_sp.* $openja/bin/jasp --run "cd $jaPrefix"
  +    makeWrapper $jaPrefix/openjkded.* $openja/bin/openjkded --run "cd $jaPrefix"
  +    makeWrapper $joPrefix/openjo_sp.* $openjo/bin/josp --run "cd $joPrefix"
   
  -    cp $src/shared/icons/OpenJK_Icon_128.png $out/share/icons/hicolor/128x128/apps
  -    ln -s ${jamp}/share/applications/* $out/share/applications
  -    ln -s ${jasp}/share/applications/* $out/share/applications
  +    cp $src/shared/icons/OpenJK_Icon_128.png $openjo/share/icons/hicolor/128x128/apps
  +    cp $src/shared/icons/OpenJK_Icon_128.png $openja/share/icons/hicolor/128x128/apps
  +    ln -s ${jamp}/share/applications/* $openja/share/applications
  +    ln -s ${jasp}/share/applications/* $openja/share/applications
  +    ln -s ${josp}/share/applications/* $openjo/share/applications
  +    ln -s $openja/bin/* $out/bin
  +    ln -s $openjo/bin/* $out/bin
  +    rm -rf $out/opt
     '';
   
     meta = with lib; {
  
positive.code:     homepage = "https://github.com/JACoders/OpenJK";
      license = licenses.gpl2;
      platforms = platforms.linux;
      maintainers = with maintainers; [ ];
    };
  }
  
negative.code:     genericName = "Jedi Academy";
      categories = [ "Game" ];
    };
    josp = makeDesktopItem rec {
      name = "josp";
      exec = name;
      icon = "OpenJK_Icon_128";
      comment = "Open Source Jedi Outcast game released by Raven Software";
      desktopName = "Jedi Outcast (Single Player)";
      genericName = "Jedi Outcast";
      categories = [ "Game" ];
    };
  in stdenv.mkDerivation {
    pname = "OpenJK";
    version = "unstable-2022-01-30";
  