diff --git a/pkgs/by-name/lm/lmstudio/darwin.nix b/pkgs/by-name/lm/lmstudio/darwin.nix index f18a880feabe4..8666739fff909 100644 --- a/pkgs/by-name/lm/lmstudio/darwin.nix +++ b/pkgs/by-name/lm/lmstudio/darwin.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, - undmg, + _7zz, meta, pname, version, @@ -16,7 +16,7 @@ stdenv.mkDerivation { inherit url hash; }; - nativeBuildInputs = [ undmg ]; + nativeBuildInputs = [ _7zz ]; sourceRoot = "."; @@ -30,24 +30,5 @@ stdenv.mkDerivation { # LM Studio ships Scripts inside the App Bundle, which may be messed up by standard fixups dontFixup = true; - # undmg doesn't support APFS and 7zz does break the xattr. Took that approach from https://github.com/NixOS/nixpkgs/blob/a3c6ed7ad2649c1a55ffd94f7747e3176053b833/pkgs/by-name/in/insomnia/package.nix#L52 - unpackCmd = '' - echo "Creating temp directory" - mnt=$(TMPDIR=/tmp mktemp -d -t nix-XXXXXXXXXX) - function finish { - echo "Ejecting temp directory" - /usr/bin/hdiutil detach $mnt -force - rm -rf $mnt - } - # Detach volume when receiving SIG "0" - trap finish EXIT - # Mount DMG file - echo "Mounting DMG file into \"$mnt\"" - /usr/bin/hdiutil attach -nobrowse -mountpoint $mnt $curSrc - # Copy content to local dir for later use - echo 'Copying extracted content into "sourceRoot"' - cp -a $mnt/LM\ Studio.app $PWD/ - ''; - inherit passthru; }