anchor.diff:      ln -s ${sqlite}/* sqlite/
       sed -ie 's| restrict| _restrict|g' dumb/include/dumb.h \
                                          dumb/src/it/*.c
  -  '' + lib.optionalString serverOnly ''
  +  '' + lib.optionalString (!serverOnly) ''
       sed -i \
         -e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
         -e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
  
positive.code:   fmod = callPackage ./fmod.nix { };
    sqlite = callPackage ./sqlite.nix { };
  
  # FIXME: drop binary package when upstream fixes their protocol versioning
  in stdenv.mkDerivation {
    name = "zandronum${suffix}-3.0";
  
  
negative.code:        *.pk3 \
         ${lib.optionalString (!serverOnly) "liboutput_sdl.so"} \
         $out/lib/zandronum
    '' + (if (!serverOnly) then
            ''makeWrapper $out/lib/zandronum/zandronum $out/bin/zandronum --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:${fluidsynth}/lib"''
          else
            ''makeWrapper $out/lib/zandronum/zandronum${suffix} $out/bin/zandronum${suffix}'');
  
    postFixup = lib.optionalString (!serverOnly) ''
      patchelf --set-rpath $(patchelf --print-rpath $out/lib/zandronum/zandronum):$out/lib/zandronum \
  