lmstudio: 0.3.11 -> 0.3.14-3
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
hash,
|
||||
pname,
|
||||
meta,
|
||||
stdenv,
|
||||
lib,
|
||||
patchelf,
|
||||
}:
|
||||
let
|
||||
src = fetchurl {
|
||||
inherit url hash;
|
||||
};
|
||||
src = fetchurl { inherit url hash; };
|
||||
|
||||
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||
in
|
||||
@@ -28,7 +29,19 @@ appimageTools.wrapType2 {
|
||||
mkdir -p $out/share/applications
|
||||
cp -r ${appimageContents}/usr/share/icons $out/share
|
||||
install -m 444 -D ${appimageContents}/lm-studio.desktop -t $out/share/applications
|
||||
|
||||
# Rename the main executable from lmstudio to lm-studio
|
||||
mv $out/bin/lmstudio $out/bin/lm-studio
|
||||
|
||||
substituteInPlace $out/share/applications/lm-studio.desktop \
|
||||
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lmstudio'
|
||||
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lm-studio'
|
||||
|
||||
# lms cli tool
|
||||
install -m 755 ${appimageContents}/resources/app/.webpack/lms $out/bin/
|
||||
|
||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
|
||||
--set-rpath "${lib.getLib stdenv.cc.cc}/lib:${lib.getLib stdenv.cc.cc}/lib64:$out/lib:${
|
||||
lib.makeLibraryPath [ (lib.getLib stdenv.cc.cc) ]
|
||||
}" $out/bin/lms
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -2,22 +2,19 @@
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
version ? "0.3.11",
|
||||
rev ? "1",
|
||||
version ? "0.3.14",
|
||||
rev ? "3",
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
pname = "lmstudio";
|
||||
packageVersion = "${version}-${rev}"; # Combine version and rev
|
||||
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/";
|
||||
license = lib.licenses.unfree;
|
||||
mainProgram = "lmstudio";
|
||||
maintainers = with lib.maintainers; [
|
||||
cig0
|
||||
eeedean
|
||||
crertel
|
||||
];
|
||||
mainProgram = "lm-studio";
|
||||
maintainers = with lib.maintainers; [ crertel ];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
@@ -28,25 +25,19 @@ let
|
||||
in
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
callPackage ./darwin.nix {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
meta
|
||||
;
|
||||
inherit pname meta;
|
||||
version = packageVersion;
|
||||
url =
|
||||
args.url
|
||||
or "https://installers.lmstudio.ai/darwin/arm64/${version}-${rev}/LM-Studio-${version}-${rev}-arm64.dmg";
|
||||
hash = args.hash or "sha256-kXH3tAazEtl019IBxuavEI9QUamEH3b6UFYRYAO3Fxs=";
|
||||
hash = args.hash or "sha256-doAhCbWFwDWlBQ+4YfJz6p7I4NZJxIOtdLYTr3mOGds=";
|
||||
}
|
||||
else
|
||||
callPackage ./linux.nix {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
meta
|
||||
;
|
||||
inherit pname meta;
|
||||
version = packageVersion;
|
||||
url =
|
||||
args.url
|
||||
or "https://installers.lmstudio.ai/linux/x64/${version}-${rev}/LM-Studio-${version}-${rev}-x64.AppImage";
|
||||
hash = args.hash or "sha256-T8j0l2ZP53Zc0hgb2EyFeR0mH5YrNlz4UfzN0rO7bKU=";
|
||||
hash = args.hash or "sha256-IIJMk0cfLQdrx0nTSbpsbqOvD+f/qrH+rGdYN4mygaw=";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user