anchor.diff:  , fetchYarnDeps
   , electron
   , element-web
  +, sqlcipher
   , callPackage
   , Security
   , AppKit
  
positive.code:     name = "element-desktop";
      exec = "${executableName} %u";
      icon = "element";
      desktopName = "Element (Riot)";
      genericName = "Matrix Client";
      comment = meta.description;
      categories = "Network;InstantMessaging;Chat;";
  
negative.code:     ln -s "${desktopItem}/share/applications" "$out/share/applications"
  
      # executable wrapper
      # LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
      makeWrapper '${electron_exec}' "$out/bin/${executableName}" \
        --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \
        --add-flags "$out/share/element/electron${lib.optionalString useWayland " --enable-features=UseOzonePlatform --ozone-platform=wayland"}"
    '';
  
  