Merge pull request #308621 from eeedean/lmstudio-update
added aarch64-darwin version of lmstudio + updated lmstudio to 0.2.22
This commit is contained in:
commit
bc5c1010d3
4 changed files with 73 additions and 27 deletions
|
@ -5700,6 +5700,11 @@
|
||||||
githubId = 54799;
|
githubId = 54799;
|
||||||
name = "Edward Tjörnhammar";
|
name = "Edward Tjörnhammar";
|
||||||
};
|
};
|
||||||
|
eeedean = {
|
||||||
|
github = "eeedean";
|
||||||
|
githubId = 8173116;
|
||||||
|
name = "Dean Eckert";
|
||||||
|
};
|
||||||
eelco = {
|
eelco = {
|
||||||
email = "edolstra+nixpkgs@gmail.com";
|
email = "edolstra+nixpkgs@gmail.com";
|
||||||
github = "edolstra";
|
github = "edolstra";
|
||||||
|
|
28
pkgs/by-name/lm/lmstudio/darwin.nix
Normal file
28
pkgs/by-name/lm/lmstudio/darwin.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, undmg
|
||||||
|
, lib
|
||||||
|
, meta
|
||||||
|
, pname
|
||||||
|
, version
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit meta pname version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://releases.lmstudio.ai/mac/arm64/${version}/b/latest/LM-Studio-${version}-arm64.dmg";
|
||||||
|
hash = "sha256-kb1XoTZjhCL1+CsV+r3/EN0srzIJ43H2VMZ779dVq1k=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ undmg ];
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
cp -r *.app $out/Applications
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
29
pkgs/by-name/lm/lmstudio/linux.nix
Normal file
29
pkgs/by-name/lm/lmstudio/linux.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib
|
||||||
|
, appimageTools
|
||||||
|
, fetchurl
|
||||||
|
, version
|
||||||
|
, pname
|
||||||
|
, meta
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://releases.lmstudio.ai/linux/${version}/beta/LM_Studio-${version}.AppImage";
|
||||||
|
hash = "sha256-hcV8wDhulFAxHDBDKicpEGovwcsn9RaIi/idUz+YzD8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||||
|
in
|
||||||
|
appimageTools.wrapType2 {
|
||||||
|
inherit meta pname version src;
|
||||||
|
|
||||||
|
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.ocl-icd ];
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
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
|
||||||
|
substituteInPlace $out/share/applications/lm-studio.desktop \
|
||||||
|
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lmstudio'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
|
@ -1,38 +1,22 @@
|
||||||
{ lib
|
{ lib
|
||||||
, appimageTools
|
, stdenv
|
||||||
, fetchurl
|
, callPackage
|
||||||
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "lmstudio";
|
pname = "lmstudio";
|
||||||
version = "0.2.20";
|
version = "0.2.22";
|
||||||
src = fetchurl {
|
|
||||||
url = "https://releases.lmstudio.ai/linux/${version}/beta/LM_Studio-${version}.AppImage";
|
|
||||||
hash = "sha256-T92ZDqGvxJfBkAWsK8EgHdQZnLefK3gDP2vCTL8X+eM=";
|
|
||||||
};
|
|
||||||
|
|
||||||
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
|
||||||
in
|
|
||||||
appimageTools.wrapType2 {
|
|
||||||
inherit pname version src;
|
|
||||||
|
|
||||||
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.ocl-icd ];
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
|
||||||
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
|
|
||||||
substituteInPlace $out/share/applications/lm-studio.desktop \
|
|
||||||
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lmstudio'
|
|
||||||
'';
|
|
||||||
|
|
||||||
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/";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
mainProgram = "lmstudio";
|
mainProgram = "lmstudio";
|
||||||
maintainers = with lib.maintainers; [ drupol ];
|
maintainers = with lib.maintainers; [ drupol eeedean ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux ++ [ "aarch64-darwin" ];
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
};
|
};
|
||||||
}
|
in
|
||||||
|
if stdenv.isDarwin
|
||||||
|
then callPackage ./darwin.nix { inherit pname version meta; }
|
||||||
|
else callPackage ./linux.nix { inherit pname version meta; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue