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