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