|
| 1 | +id: ai.jan.Jan |
| 2 | +runtime: org.gnome.Platform |
| 3 | +runtime-version: '48' |
| 4 | +sdk: org.gnome.Sdk |
| 5 | +command: Jan |
| 6 | +finish-args: |
| 7 | + - --socket=wayland # Permission needed to show the window |
| 8 | + - --socket=fallback-x11 # Permission needed to show the window on X11 |
| 9 | + - --device=dri |
| 10 | + - --share=ipc |
| 11 | + - --share=network |
| 12 | + - --socket=pulseaudio # for future multimodality |
| 13 | + - --filesystem=xdg-run/dconf |
| 14 | + - --filesystem=~/.config/dconf:ro |
| 15 | + - --filesystem=~/.config/kioslaverc |
| 16 | + - --env=GTK_PATH=/app/lib/gtkmodules |
| 17 | + |
| 18 | +modules: |
| 19 | + - name: volk |
| 20 | + buildsystem: cmake-ninja |
| 21 | + builddir: true |
| 22 | + config-opts: |
| 23 | + - -DVOLK_INSTALL=ON |
| 24 | + sources: |
| 25 | + - type: archive |
| 26 | + url: https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.280.0.zip |
| 27 | + sha256: 178875134d36e8b90f7e3ec31171355df3b71f47eba49cca2f98158e6552b011 |
| 28 | + |
| 29 | + - name: vulkan-headers |
| 30 | + buildsystem: cmake-ninja |
| 31 | + builddir: true |
| 32 | + sources: |
| 33 | + - type: archive |
| 34 | + url: https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.283.zip |
| 35 | + sha256: 2094159c87fb4b6d8f734bd4cad59564cef7ef32feb00cf6d8ca7e75a84df921 |
| 36 | + |
| 37 | + - name: vulkan-tools |
| 38 | + buildsystem: cmake-ninja |
| 39 | + builddir: true |
| 40 | + sources: |
| 41 | + - type: archive |
| 42 | + url: https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/v1.3.283.zip |
| 43 | + sha256: 11ec6b474e91dc8cb6e7f22891294ede549bb6ed67c19d230e293b3fc9610883 |
| 44 | + |
| 45 | + - name: shaderc |
| 46 | + buildsystem: cmake-ninja |
| 47 | + builddir: true |
| 48 | + config-opts: |
| 49 | + - -DSHADERC_SKIP_COPYRIGHT_CHECK=ON |
| 50 | + - -DSHADERC_SKIP_EXAMPLES=ON |
| 51 | + - -DSHADERC_SKIP_TESTS=ON |
| 52 | + - -DSPIRV_SKIP_EXECUTABLES=ON |
| 53 | + - -DENABLE_GLSLANG_BINARIES=OFF |
| 54 | + cleanup: |
| 55 | + - /bin |
| 56 | + - /include |
| 57 | + - /lib/cmake |
| 58 | + - /lib/pkgconfig |
| 59 | + sources: |
| 60 | + - type: git |
| 61 | + url: https://github.com/google/shaderc.git |
| 62 | + tag: v2024.1 |
| 63 | + commit: 47a9387ef5b3600d30d84c71ec77a59dc7db46fa |
| 64 | + # https://github.com/google/shaderc/blob/known-good/known_good.json |
| 65 | + - type: git |
| 66 | + url: https://github.com/KhronosGroup/SPIRV-Tools.git |
| 67 | + commit: dd4b663e13c07fea4fbb3f70c1c91c86731099f7 |
| 68 | + dest: third_party/spirv-tools |
| 69 | + - type: git |
| 70 | + url: https://github.com/KhronosGroup/SPIRV-Headers.git |
| 71 | + commit: 5e3ad389ee56fca27c9705d093ae5387ce404df4 |
| 72 | + dest: third_party/spirv-headers |
| 73 | + - type: git |
| 74 | + url: https://github.com/KhronosGroup/glslang.git |
| 75 | + commit: 142052fa30f9eca191aa9dcf65359fcaed09eeec |
| 76 | + dest: third_party/glslang |
| 77 | + |
| 78 | + - name: cuda-toolkit |
| 79 | + only-arches: |
| 80 | + - x86_64 |
| 81 | + cleanup: |
| 82 | + - /cuda |
| 83 | + buildsystem: simple |
| 84 | + build-commands: |
| 85 | + - mkdir /app/cuda |
| 86 | + - sh cuda_toolkit.run --silent --toolkit --toolkitpath=/app/cuda |
| 87 | + - mv /app/cuda/lib64/libcudart.* /app/lib/ |
| 88 | + - mv /app/cuda/lib64/libcublas* /app/lib/ |
| 89 | + sources: |
| 90 | + - type: file |
| 91 | + only-arches: |
| 92 | + - x86_64 |
| 93 | + url: https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux.run |
| 94 | + dest-filename: cuda_toolkit.run |
| 95 | + md5: c71027cf1a4ce84f80b9cbf81116e767 |
| 96 | + |
| 97 | + - name: binary |
| 98 | + buildsystem: simple |
| 99 | + sources: |
| 100 | + - type: file |
| 101 | + url: https://catalog.jan.ai/flatpak/Jan_0.6.8_amd64.deb |
| 102 | + sha256: 15d1368c318a3853bad4fc3646f88afdbf9f52b6416a4734f7a297741d171f28 |
| 103 | + only-arches: [x86_64] |
| 104 | + - type: file |
| 105 | + path: ai.jan.Jan.metainfo.xml |
| 106 | + build-commands: |
| 107 | + - ar -x *.deb |
| 108 | + - tar -xf data.tar.gz |
| 109 | + - 'install -Dm755 usr/bin/Jan /app/bin/Jan' |
| 110 | + - 'install -Dm755 usr/bin/bun /app/bin/bun' |
| 111 | + - 'install -Dm755 usr/bin/uv /app/bin/uv' |
| 112 | + - cp -rv usr/lib/* /app/lib/. |
| 113 | + - install -Dm644 usr/share/applications/Jan.desktop /app/share/applications/ai.jan.Jan.desktop |
| 114 | + - sed -e 's/Icon=Jan/Icon=ai.jan.Jan/g' -e 's#Exec=Jan#Exec=/app/bin/Jan#g' -i /app/share/applications/ai.jan.Jan.desktop |
| 115 | + - install -Dm644 usr/share/icons/hicolor/128x128/apps/Jan.png /app/share/icons/hicolor/128x128/apps/ai.jan.Jan.png |
| 116 | + - install -Dm644 usr/share/icons/hicolor/32x32/apps/Jan.png /app/share/icons/hicolor/32x32/apps/ai.jan.Jan.png |
| 117 | + - install -Dm644 usr/share/icons/hicolor/256x256@2/apps/Jan.png /app/share/icons/hicolor/256x256@2/apps/ai.jan.Jan.png |
| 118 | + - install -Dm644 ai.jan.Jan.metainfo.xml /app/share/metainfo/ai.jan.Jan.rosary.metainfo.xml |
0 commit comments