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