mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-27 04:53:50 +03:00
use mold on linux
This commit is contained in:
parent
a6712627e4
commit
eb4323cc0f
1 changed files with 8 additions and 1 deletions
|
@ -25,6 +25,12 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
|
# Use mold on Linux
|
||||||
|
stdenv = if pkgs.stdenv.isLinux then
|
||||||
|
pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv
|
||||||
|
else
|
||||||
|
pkgs.stdenv;
|
||||||
|
|
||||||
# Nix-accessible `Cargo.toml`
|
# Nix-accessible `Cargo.toml`
|
||||||
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||||
|
|
||||||
|
@ -54,12 +60,13 @@
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
stdenv
|
||||||
nativeBuildInputs
|
nativeBuildInputs
|
||||||
ROCKSDB_INCLUDE_DIR
|
ROCKSDB_INCLUDE_DIR
|
||||||
ROCKSDB_LIB_DIR;
|
ROCKSDB_LIB_DIR;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = (pkgs.mkShell.override { inherit stdenv; }) {
|
||||||
# Rust Analyzer needs to be able to find the path to default crate
|
# Rust Analyzer needs to be able to find the path to default crate
|
||||||
# sources, and it can read this environment variable to do so
|
# sources, and it can read this environment variable to do so
|
||||||
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
||||||
|
|
Loading…
Reference in a new issue