lmstudio: make version, rev, url and hash overrideable (#378810)
This commit is contained in:
@@ -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 ];
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -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=";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user