2024-08-26 15:10:34 +00:00
|
|
|
{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 let
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
curl
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libgit2
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
zlib
|
|
|
|
zstd
|
|
|
|
alsa-lib
|
|
|
|
libxkbcommon
|
|
|
|
wayland
|
|
|
|
xorg.libxcb
|
|
|
|
vulkan-loader
|
2024-09-23 14:16:15 +00:00
|
|
|
rustToolchain
|
2024-08-26 15:10:34 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
pkgs.mkShell.override {inherit stdenv;} {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
clang
|
|
|
|
curl
|
2024-09-18 02:09:59 +00:00
|
|
|
cmake
|
2024-08-26 15:10:34 +00:00
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
protobuf
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
shellHook = ''
|
2024-09-18 16:51:11 +00:00
|
|
|
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH"
|
2024-08-26 15:10:34 +00:00
|
|
|
export PROTOC="${pkgs.protobuf}/bin/protoc"
|
|
|
|
'';
|
|
|
|
|
|
|
|
FONTCONFIG_FILE = pkgs.makeFontsConf {
|
|
|
|
fontDirectories = [
|
|
|
|
"./assets/fonts/zed-mono"
|
|
|
|
"./assets/fonts/zed-sans"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
}
|