default.nix (975B)
1 { 2 lib, 3 stdenvNoCC, 4 fetchurl, 5 _7zz, 6 }: 7 8 stdenvNoCC.mkDerivation (finalAttrs: { 9 pname = "zed"; 10 version = "0.175.3-pre"; 11 12 src = fetchurl { 13 url = "https://zed.dev/api/releases/stable/${finalAttrs.version}/Zed-x86_64.dmg"; 14 hash = "sha256-+Oxg9vAXvYF56hgr/PfZlnP1ihf1j2L6md8FXy8duVY="; 15 }; 16 17 sourceRoot = "."; 18 19 # APFS format is unsupported by undmg 20 nativeBuildInputs = [ _7zz ]; 21 unpackCmd = "7zz x $curSrc"; 22 23 installPhase = '' 24 runHook preInstall 25 mkdir -p $out/{Applications,bin} 26 cp -r *.app $out/Applications 27 ln -s "$out/Applications/Zed Preview.app/Contents/MacOS/cli" $out/bin/zed 28 runHook postInstall 29 ''; 30 31 meta = { 32 description = "High-performance, multiplayer code editor"; 33 homepage = "https://zed.dev"; 34 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 35 license = lib.licenses.free; 36 maintainers = [ lib.maintainers.sikmir ]; 37 platforms = [ "x86_64-darwin" ]; 38 skip.ci = true; 39 }; 40 })