{
 "app_id": "no.mifi.losslesscut",
 "source_url": "https://raw.githubusercontent.com/flathub/no.mifi.losslesscut/master/no.mifi.losslesscut.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-download",
  "--filesystem=xdg-public-share",
  "--filesystem=xdg-videos",
  "--talk-name=org.freedesktop.Notifications"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:14:01.984798+00:00",
 "manifest": {
  "app-id": "no.mifi.losslesscut",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node24"
  ],
  "separate-locales": false,
  "command": "run.sh",
  "finish-args": [
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--socket=pulseaudio",
   "--socket=wayland",
   "--filesystem=xdg-download",
   "--filesystem=xdg-public-share",
   "--filesystem=xdg-videos",
   "--talk-name=org.freedesktop.Notifications"
  ],
  "modules": [
   {
    "name": "lossless-cut",
    "buildsystem": "simple",
    "run-tests": true,
    "build-options": {
     "append-path": "/usr/lib/sdk/node24/bin",
     "append-pkg-config-path": "/app/lib64/pkgconfig",
     "append-ld-library-path": "/app/lib64/",
     "env": {
      "NPM_CONFIG_LOGLEVEL": "info",
      "npm_config_nodedir": "/usr/lib/sdk/node24",
      "XDG_CACHE_HOME": "/run/build/lossless-cut/flatpak-node/cache",
      "YARN_ENABLE_INLINE_BUILDS": "1",
      "YARN_ENABLE_TELEMETRY": "0",
      "YARN_ENABLE_NETWORK": "0",
      "YARN_ENABLE_GLOBAL_CACHE": "0",
      "YARN_GLOBAL_FOLDER": "/run/build/lossless-cut/flatpak-node/yarn-berry",
      "SHARP_FORCE_GLOBAL_LIBVIPS": "1"
     }
    },
    "modules": [
     "ffmpeg.yaml",
     {
      "name": "libvips",
      "buildsystem": "meson",
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/libvips/libvips/releases/download/v8.18.5/vips-8.18.5.tar.xz",
        "sha512": "0351887a74f530a8c1f46093e305cff245bd90473f3016e83de550d102f3631da3d2351d055f9ade8b440e636c4aa20b42ed0bc9eec952a440ef668d2ecdd45d",
        "x-checker-data": {
         "type": "json",
         "url": "https://api.github.com/repos/libvips/libvips/releases/latest",
         "version-query": ".tag_name | sub(\"^v\"; \"\")",
         "url-query": ".assets[] | select(.name==\"vips-\" + $version + \".tar.xz\") | .browser_download_url"
        }
       }
      ]
     }
    ],
    "build-commands": [
     "echo $PKG_CONFIG_PATH",
     "pkg-config --modversion vips-cpp",
     "echo $LD_LIBRARY_PATH",
     "node --version",
     "yarn --version",
     "yarn config",
     "yarn plugin import $FLATPAK_BUILDER_BUILDDIR/flatpak-node/flatpak-yarn.js",
     "yarn convertToZip $(which yarn)",
     "yarn install",
     "yarn build",
     ". flatpak-node/electron-builder-arch-args.sh\nyarn run pack-linux $ELECTRON_BUILDER_ARCH_ARGS --config.asar=false --dir\n",
     "mkdir -p /app/lossless-cut",
     "cp -ar dist/linux-*unpacked/* /app/lossless-cut/",
     "install -Dm a+rx /app/bin/ffmpeg  /app/lossless-cut/resources/ffmpeg",
     "install -Dm a+rx /app/bin/ffprobe  /app/lossless-cut/resources/ffprobe",
     "install run.sh /app/bin/run.sh",
     "desktop-file-edit --set-key Exec --set-value /app/bin/run.sh  no.mifi.losslesscut.desktop",
     "install -Dm 0644 no.mifi.losslesscut.desktop  /app/share/applications/no.mifi.losslesscut.desktop",
     "install -Dm 0644 no.mifi.losslesscut.appdata.xml  /app/share/metainfo/no.mifi.losslesscut.appdata.xml",
     "install -Dm 0644 src/renderer/src/icon.svg /app/share/icons/hicolor/scalable/apps/no.mifi.losslesscut.svg"
    ],
    "test-commands": [
     "/app/lossless-cut/resources/ffprobe -version",
     "/app/lossless-cut/resources/ffmpeg -version",
     "/app/lossless-cut/resources/ffmpeg '-hide_banner' '-f' 'lavfi' '-i' 'nullsrc=s=256x256:d=1' '-f' 'null' '-'"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/mifi/lossless-cut/archive/v3.69.0.tar.gz",
      "sha512": "4f4a04b38a05d70fa9fbe3b916464c50e16e3302ee9c07ba015e3b99b3eccc82934a0879487c92a1acdcf8bc1f0d33809f4299f86235b8702b3b4ab1b8ecb67c",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/mifi/lossless-cut/releases/latest",
       "version-query": ".tag_name",
       "url-query": ".assets[] | select(.name==\"\" + $version + \".tar.xz\") | .browser_download_url"
      }
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "zypak-wrapper /app/lossless-cut/losslesscut \"$@\""
      ]
     },
     "generated-sources.json"
    ]
   }
  ]
 }
}