{
    "id": "io.github.seadve.Delineate.Devel",
    "runtime": "org.gnome.Platform",
    "runtime-version": "master",
    "sdk": "org.gnome.Sdk",
    "sdk-extensions": [
        "org.freedesktop.Sdk.Extension.rust-stable",
        "org.freedesktop.Sdk.Extension.llvm18",
        "org.freedesktop.Sdk.Extension.node20"
    ],
    "command": "delineate",
    "finish-args": [
        "--share=ipc",
        "--socket=fallback-x11",
        "--socket=wayland",
        "--device=dri",
        "--env=RUST_LOG=delineate=debug",
        "--env=G_MESSAGES_DEBUG=none",
        "--env=RUST_BACKTRACE=1",
        "--env=RUST_LIB_BACKTRACE=0"
    ],
    "build-options": {
        "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm18/bin",
        "build-args": [
            "--share=network"
        ],
        "env": {
            "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang",
            "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"
        }
    },
    "modules": [
        {
            "name": "d3-graphviz",
            "buildsystem": "simple",
            "build-options": {
                "append-path": "/usr/lib/sdk/node20/bin"
            },
            "build-commands": [
                "npm install",
                "npm run build",
                "mkdir -p $FLATPAK_DEST/src/delineate/graph_view/d3-graphviz",
                "cp -r node_modules $FLATPAK_DEST/src/delineate/graph_view/d3-graphviz",
                "cp -r build $FLATPAK_DEST/src/delineate/graph_view/d3-graphviz"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/magjac/d3-graphviz.git",
                    "tag": "v5.6.0"
                }
            ]
        },
        {
            "name": "delineate",
            "buildsystem": "meson",
            "run-tests": true,
            "config-opts": [
                "-Dprofile=development"
            ],
            "sources": [
                {
                    "type": "dir",
                    "path": "../"
                }
            ]
        }
    ]
}