mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
add etc/shell.nix for nix/nixOS
This commit is contained in:
parent
2a02e017a4
commit
9d0b06ac54
1 changed files with 40 additions and 0 deletions
40
etc/shell.nix
Normal file
40
etc/shell.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# This provides a shell with all the necesarry packages required to run mach and build servo
|
||||||
|
# NOTE: This does not work offline or for nix-build
|
||||||
|
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
clangStdenv.mkDerivation rec {
|
||||||
|
name = "servo-env";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
# Native dependencies
|
||||||
|
fontconfig freetype openssl libunwind
|
||||||
|
xlibs.libxcb x11
|
||||||
|
|
||||||
|
gst_all_1.gstreamer
|
||||||
|
gst_all_1.gst-plugins-base
|
||||||
|
gst_all_1.gst-plugins-bad
|
||||||
|
|
||||||
|
rustup
|
||||||
|
|
||||||
|
# Build utilities
|
||||||
|
cmake dbus gcc git pkgconfig which llvm autoconf213 perl yasm m4
|
||||||
|
(python3.withPackages (ps: with ps; [virtualenv pip dbus]))
|
||||||
|
];
|
||||||
|
|
||||||
|
LIBCLANG_PATH = llvmPackages.clang-unwrapped.lib + "/lib/";
|
||||||
|
|
||||||
|
# Allow cargo to download crates
|
||||||
|
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
|
||||||
|
# Enable colored cargo and rustc output
|
||||||
|
TERMINFO = "${ncurses.out}/share/terminfo";
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
# Fix missing libraries errors (those libraries aren't linked against, so we need to dynamically supply them)
|
||||||
|
export LD_LIBRARY_PATH=${lib.makeLibraryPath [ xorg.libXcursor xorg.libXrandr xorg.libXi ]}
|
||||||
|
# Fix invalid option errors during linking
|
||||||
|
# https://github.com/mozilla/nixpkgs-mozilla/commit/c72ff151a3e25f14182569679ed4cd22ef352328
|
||||||
|
unset AS
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue