From 0b1b31e9c6f4de60cfd2ee3895d339ddfa567d97 Mon Sep 17 00:00:00 2001 From: juh9870 Date: Thu, 1 Feb 2024 11:07:20 +0200 Subject: [PATCH] Added mozilla overlay and mold linker to shell.nix --- shell.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 30d2046f..527dc4bb 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,19 @@ -with import { }; +let + moz_overlay = import (builtins.fetchTarball + "https://github.com/mozilla/nixpkgs-mozilla/archive/9b11a87c0cc54e308fa83aac5b4ee1816d5418a2.tar.gz"); + nixpkgs = import { overlays = [ moz_overlay ]; }; +in with nixpkgs; let dlopen-libs = with xorg; [ vulkan-loader libX11 libXcursor libXrandr libXi ]; -in mkShell { - nativeBuildInputs = with pkgs; [ rustChannels.stable.rust pkg-config zstd protobuf ]; +in mkShell.override { + stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv; +} { + nativeBuildInputs = with pkgs; [ + rustChannels.stable.rust + pkg-config + zstd + protobuf + ]; shellHook = '' export RUST_BACKTRACE=1 export ZSTD_SYS_USE_PKG_CONFIG=1