lmstudio: 0.3.14.3 -> 0.3.14-5 (#393911)

This commit is contained in:
Austin Horstman
2025-04-19 22:50:23 -07:00
committed by GitHub
2 changed files with 30 additions and 9 deletions

View File

@@ -2,13 +2,18 @@
lib, lib,
stdenv, stdenv,
callPackage, callPackage,
version ? "0.3.14",
rev ? "3",
... ...
}@args: }@args:
let let
pname = "lmstudio"; pname = "lmstudio";
packageVersion = "${version}-${rev}"; # Combine version and rev
version_aarch64-darwin = "0.3.14-5";
hash_aarch64-darwin = "sha256-8OTfjEZ27ubRFvRQ84em2Gz3mS9w3oev41Qg6MMNjNU=";
version_x86_64-linux = "0.3.14-5";
hash_x86_64-linux = "sha256-WrO95ez81/A0U1Tt1Oi2PyUp6nvsmQMzK0VUVH1TYbg=";
passthru.updateScript = ./update.sh;
meta = { meta = {
description = "LM Studio is an easy to use desktop app for experimenting with local and open-source Large Language Models (LLMs)"; description = "LM Studio is an easy to use desktop app for experimenting with local and open-source Large Language Models (LLMs)";
homepage = "https://lmstudio.ai/"; homepage = "https://lmstudio.ai/";
@@ -26,18 +31,18 @@ in
if stdenv.hostPlatform.isDarwin then if stdenv.hostPlatform.isDarwin then
callPackage ./darwin.nix { callPackage ./darwin.nix {
inherit pname meta; inherit pname meta;
version = packageVersion; version = version_aarch64-darwin;
url = url =
args.url args.url
or "https://installers.lmstudio.ai/darwin/arm64/${version}-${rev}/LM-Studio-${version}-${rev}-arm64.dmg"; or "https://installers.lmstudio.ai/darwin/arm64/${version_aarch64-darwin}/LM-Studio-${version_aarch64-darwin}-arm64.dmg";
hash = args.hash or "sha256-doAhCbWFwDWlBQ+4YfJz6p7I4NZJxIOtdLYTr3mOGds="; hash = args.hash or hash_aarch64-darwin;
} }
else else
callPackage ./linux.nix { callPackage ./linux.nix {
inherit pname meta; inherit pname meta;
version = packageVersion; version = version_x86_64-linux;
url = url =
args.url args.url
or "https://installers.lmstudio.ai/linux/x64/${version}-${rev}/LM-Studio-${version}-${rev}-x64.AppImage"; or "https://installers.lmstudio.ai/linux/x64/${version_x86_64-linux}/LM-Studio-${version_x86_64-linux}-x64.AppImage";
hash = args.hash or "sha256-IIJMk0cfLQdrx0nTSbpsbqOvD+f/qrH+rGdYN4mygaw="; hash = args.hash or hash_x86_64-linux;
} }

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
set -euo pipefail
packages="$(curl -s -L "https://lmstudio.ai/" | grep -oE 'https://installers.lmstudio.ai[^"\]*' | sort -u | grep -v \\.exe)"
for system in "aarch64-darwin darwin/arm64" "x86_64-linux linux/x64"; do
set -- ${system}
arch="${1}"
url=$(echo "${packages}" | grep "${2}")
version="$(echo "${url}" | cut -d/ -f6)"
hash=$(nix hash convert --hash-algo sha256 "$(nix-prefetch-url "${url}")")
update-source-version lmstudio "${version}" "${hash}" --system="${arch}" --version-key="version_${arch}"
done