lmstudio: make version, rev, url and hash overrideable (#378810)

This commit is contained in:
Arne Keller
2025-02-23 10:55:25 +01:00
committed by GitHub
3 changed files with 17 additions and 11 deletions
+3 -3
View File
@@ -5,14 +5,14 @@
meta,
pname,
version,
rev,
url,
hash,
}:
stdenv.mkDerivation {
inherit meta pname version;
src = fetchurl {
url = "https://installers.lmstudio.ai/darwin/arm64/${version}-${rev}/LM-Studio-${version}-${rev}-arm64.dmg";
hash = "sha256-x4IRT1PjBz9eafmwNRyLVq+4/Rkptz6RVWDFdRrGnGY=";
inherit url hash;
};
nativeBuildInputs = [ undmg ];
+3 -3
View File
@@ -2,14 +2,14 @@
appimageTools,
fetchurl,
version,
rev,
url,
hash,
pname,
meta,
}:
let
src = fetchurl {
url = "https://installers.lmstudio.ai/linux/x64/${version}-${rev}/LM-Studio-${version}-${rev}-x64.AppImage";
hash = "sha256-laROBUr1HLoaQT6rYhhhulR1KZuKczNomKbrXXkDANY=";
inherit url hash;
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
+11 -5
View File
@@ -2,12 +2,12 @@
lib,
stdenv,
callPackage,
version ? "0.3.6",
rev ? "8",
...
}:
}@args:
let
pname = "lmstudio";
version = "0.3.6";
rev = "8";
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/";
@@ -30,16 +30,22 @@ if stdenv.hostPlatform.isDarwin then
inherit
pname
version
rev
meta
;
url =
args.url
or "https://installers.lmstudio.ai/darwin/arm64/${version}-${rev}/LM-Studio-${version}-${rev}-arm64.dmg";
hash = args.hash or "sha256-x4IRT1PjBz9eafmwNRyLVq+4/Rkptz6RVWDFdRrGnGY=";
}
else
callPackage ./linux.nix {
inherit
pname
version
rev
meta
;
url =
args.url
or "https://installers.lmstudio.ai/linux/x64/${version}-${rev}/LM-Studio-${version}-${rev}-x64.AppImage";
hash = args.hash or "sha256-laROBUr1HLoaQT6rYhhhulR1KZuKczNomKbrXXkDANY=";
}