lmstudio: 0.3.14.3 -> 0.3.14-5 (#393911)
This commit is contained in:
@@ -2,13 +2,18 @@
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
version ? "0.3.14",
|
||||
rev ? "3",
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
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 = {
|
||||
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/";
|
||||
@@ -26,18 +31,18 @@ in
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
callPackage ./darwin.nix {
|
||||
inherit pname meta;
|
||||
version = packageVersion;
|
||||
version = version_aarch64-darwin;
|
||||
url =
|
||||
args.url
|
||||
or "https://installers.lmstudio.ai/darwin/arm64/${version}-${rev}/LM-Studio-${version}-${rev}-arm64.dmg";
|
||||
hash = args.hash or "sha256-doAhCbWFwDWlBQ+4YfJz6p7I4NZJxIOtdLYTr3mOGds=";
|
||||
or "https://installers.lmstudio.ai/darwin/arm64/${version_aarch64-darwin}/LM-Studio-${version_aarch64-darwin}-arm64.dmg";
|
||||
hash = args.hash or hash_aarch64-darwin;
|
||||
}
|
||||
else
|
||||
callPackage ./linux.nix {
|
||||
inherit pname meta;
|
||||
version = packageVersion;
|
||||
version = version_x86_64-linux;
|
||||
url =
|
||||
args.url
|
||||
or "https://installers.lmstudio.ai/linux/x64/${version}-${rev}/LM-Studio-${version}-${rev}-x64.AppImage";
|
||||
hash = args.hash or "sha256-IIJMk0cfLQdrx0nTSbpsbqOvD+f/qrH+rGdYN4mygaw=";
|
||||
or "https://installers.lmstudio.ai/linux/x64/${version_x86_64-linux}/LM-Studio-${version_x86_64-linux}-x64.AppImage";
|
||||
hash = args.hash or hash_x86_64-linux;
|
||||
}
|
||||
|
||||
16
pkgs/by-name/lm/lmstudio/update.sh
Executable file
16
pkgs/by-name/lm/lmstudio/update.sh
Executable 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
|
||||
Reference in New Issue
Block a user