about summary refs log tree commit diff
path: root/pkgs/by-name/lm/lmstudio/darwin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/lm/lmstudio/darwin.nix')
-rw-r--r--pkgs/by-name/lm/lmstudio/darwin.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/by-name/lm/lmstudio/darwin.nix b/pkgs/by-name/lm/lmstudio/darwin.nix
new file mode 100644
index 0000000000000..91c2ce3b4ca9f
--- /dev/null
+++ b/pkgs/by-name/lm/lmstudio/darwin.nix
@@ -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}/latest/LM-Studio-${version}-arm64.dmg";
+    hash = "sha256-wl3uyRtqY5w8NnESBKcP+CicIh8cCkKmrcVuiijzzTQ=";
+  };
+
+  nativeBuildInputs = [ undmg ];
+
+  sourceRoot = ".";
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/Applications
+    cp -r *.app $out/Applications
+    runHook postInstall
+  '';
+}
+