# shell.nix · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/blob/8e9e94de22d9e767070a165625bbd773b9db1a09/shell.nix)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8e9e94de22d9e767070a165625bbd773b9db1a09

Requested commit: 8e9e94de22d9e767070a165625bbd773b9db1a09

Commit: 8e9e94de22d9e767070a165625bbd773b9db1a09

Blob: be2dcb2f885f88ca8be382d44724699516c4b587

Size: 1094 bytes

[Immutable source](https://git.cafe/gitcafe/zed/blob/8e9e94de22d9e767070a165625bbd773b9db1a09/shell.nix?format=markdown)

```
{
  pkgs ? import <nixpkgs> { },
}:

let
  stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_18.stdenv;
in
if pkgs.stdenv.isDarwin then
  # See https://github.com/NixOS/nixpkgs/issues/320084
  throw "zed: nix dev-shell isn't supported on darwin yet."
else
  (pkgs.mkShell.override { inherit stdenv; }) rec {
    nativeBuildInputs = with pkgs; [
      copyDesktopItems
      curl
      perl
      pkg-config
      protobuf
      rustPlatform.bindgenHook
    ];

    buildInputs = with pkgs; [
      curl
      fontconfig
      freetype
      libgit2
      openssl
      sqlite
      zlib
      zstd

      alsa-lib
      libxkbcommon
      wayland
      xorg.libxcb
    ];

    env = {
      LD_LIBRARY_PATH =
        with pkgs;
        lib.makeLibraryPath (
          buildInputs
          ++ [
            stdenv.cc.cc.lib
            vulkan-loader
          ]
        );
      ZSTD_SYS_USE_PKG_CONFIG = true;
      FONTCONFIG_FILE = pkgs.makeFontsConf {
        fontDirectories = [
          "assets/fonts/zed-mono"
          "assets/fonts/zed-sans"
        ];
      };
    };
  }

```
