Files
chromebrew/packages/lmstudio.rb
Satadru Pramanik, DO, MPH, MEng b00dfcc06f Update Firefox and fix more circular deps. (#14353)
* Add unbuilt firefox to updater-firefox-147.0.2

* Adjust firefox deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust firefox deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Change all sommelier deps to => :logical deps

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fix circular dependencies of docbook_xml and docbook_xml412.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Cleanup docbook circular deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fix elogind, ffmpeg circular deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Cleanup more circular deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Mark packages from successful builds as automatically buildable.

* updater-firefox-147.0.2: Package File Update Run on linux/386 container.

* Add filelists and updated packages.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fix gstreamer deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Handle missing dlist, update pipewire filelist

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* lint

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add rsu_client filelist

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Suggested changes.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust elogind deps.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust docbook heredocs.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
Co-authored-by: satmandu <satmandu@users.noreply.github.com>
Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
2026-01-29 03:07:42 +00:00

84 lines
2.4 KiB
Ruby

require 'package'
class Lmstudio < Package
description 'Discover, download, and run local LLMs'
homepage 'https://lmstudio.ai/'
version '0.2.26'
license 'MIT'
compatibility 'x86_64'
source_url "https://releases.lmstudio.ai/linux/x86/#{version}/beta/LM_Studio-#{version}.AppImage"
source_sha256 '857aa577b83e8af4182e830dc4f77482f04007ae6df52092242d5a8319868926'
depends_on 'alsa_lib' # R
depends_on 'at_spi2_core' # R
depends_on 'cairo' # R
depends_on 'harfbuzz' # R
depends_on 'cups' # R
depends_on 'dbus' # R
depends_on 'dbus_glib' # R
depends_on 'expat' # R
depends_on 'gcc_lib' # R
depends_on 'gdk_pixbuf' # R
depends_on 'glib' # R
depends_on 'glibc' # R
depends_on 'gtk2' # R
depends_on 'gtk3' # R
depends_on 'libdrm' # R
depends_on 'libx11' # R
depends_on 'libxcb' # R
depends_on 'libxcomposite' # R
depends_on 'libxdamage' # R
depends_on 'libxext' # R
depends_on 'libxfixes' # R
depends_on 'libxkbcommon' # R
depends_on 'libxrandr' # R
depends_on 'mesa' # R
depends_on 'nss' # R
depends_on 'opencl_icd_loader' # R
depends_on 'pango' # R
depends_on 'gdk_base' # R
depends_on 'sommelier' => :logical
no_shrink
no_compile_needed
print_source_bashrc
def self.build
File.write 'lmstudio.sh', <<~EOF
#!/bin/bash
rm -f "#{HOME}/.cache/lm-studio/gpu-preferences.json"
cd #{CREW_PREFIX}/share/lmstudio
GDK_BACKEND=x11 ./AppRun "$@"
EOF
end
def self.install
FileUtils.rm 'lm-studio.png'
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.mv 'usr/share', CREW_DEST_PREFIX
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/lmstudio"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/applications"
FileUtils.mv 'lm-studio.desktop', "#{CREW_DEST_PREFIX}/share/applications"
FileUtils.install 'lmstudio.sh', "#{CREW_DEST_PREFIX}/bin/lmstudio", mode: 0o755
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/lmstudio"
end
def self.postinstall
ExitMessage.add "\nType 'lmstudio' to get started.\n".lightblue
end
def self.postremove
config_dir = "#{HOME}/.cache/lm-studio"
if Dir.exist? config_dir
print "Would you like to remove the #{config_dir} directory? [y/N] "
case $stdin.gets.chomp.downcase
when 'y', 'yes'
FileUtils.rm_rf config_dir
puts "#{config_dir} removed.".lightgreen
else
puts "#{config_dir} saved.".lightgreen
end
end
end
end