forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
56 lines (52 loc) · 1.07 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
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"
];
};
};
}