anchor.diff:      inherit src;
   
       cmakeFlags = [
  -      (cmFlag "HIGH_BIT_DEPTH" true)
  -      (cmFlag "EXPORT_C_API" false)
  -      (cmFlag "ENABLE_SHARED" false)
  -      (cmFlag "ENABLE_CLI" false)
  -      (cmFlag "MAIN12" true)
  +      "-DENABLE_CLI=OFF"
  +      "-DENABLE_SHARED=OFF"
  +      "-DEXPORT_C_API=OFF"
  +      "-DHIGH_BIT_DEPTH=ON"
  +      "-DLINKED_8BIT=OFF"
  +      "-DLINKED_10BIT=OFF"
  +      "-DLINKED_12BIT=OFF"
  +      "-DMAIN12=ON"
       ] ++ cmakeFlagsAll;
   
       preConfigure = /* x265 source directory is `source`, not `src` */ ''
  
positive.code:     inherit src;
  
      cmakeFlags = [
        (cmFlag "HIGH_BIT_DEPTH" true)
        (cmFlag "EXPORT_C_API" false)
        (cmFlag "ENABLE_SHARED" false)
        (cmFlag "ENABLE_CLI" false)
        (cmFlag "MAIN12" false)
      ] ++ cmakeFlagsAll;
  
      preConfigure = /* x265 source directory is `source`, not `src` */ ''
  
negative.code:     "${libx265-12}/lib/libx265_main12.a"
    ];
  
    x265Libs = concatStringsSep ";" x265AdditionalLibs;
  
    cmakeFlags = [
      "-DDETAILED_CU_STATS=${boolOn custatsSupport}"
      "-DENABLE_CLI=${boolOn cliSupport}"
      "-DENABLE_SHARED=ON"
      "-DHIGH_BIT_DEPTH=OFF"
      "-DLINKED_8BIT=OFF"
      "-DLINKED_10BIT=ON"
      "-DLINKED_12BIT=ON"
      #"NO_ATOMICS"
      "-DSTATIC_LINK_CRT=OFF"
      "-DEXPORT_C_API=ON"
      "-DEXTRA_LIB=${x265Libs}"
    ] ++ cmakeFlagsAll;
  
    postInstall = /* Remove static library */ ''
      rm -v $out/lib/libx265.a
  