mirror of
https://github.com/NotAShelf/microfetch.git
synced 2024-11-26 16:56:47 +00:00
nix: build with llvm.stdenv; use mold linker
This commit is contained in:
parent
5c335d179e
commit
7de3f27642
1 changed files with 6 additions and 2 deletions
|
@ -1,17 +1,21 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
stdenvAdapters,
|
||||||
|
llvm,
|
||||||
}: let
|
}: let
|
||||||
toml = (lib.importTOML ../Cargo.toml).package;
|
toml = (lib.importTOML ../Cargo.toml).package;
|
||||||
pname = toml.name;
|
pname = toml.name;
|
||||||
inherit (toml) version;
|
inherit (toml) version;
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
||||||
|
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
||||||
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = builtins.path {
|
src = builtins.path {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
path = ../.;
|
path = lib.sources.cleanSource ../.;
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoLock.lockFile = ../Cargo.lock;
|
cargoLock.lockFile = ../Cargo.lock;
|
||||||
|
|
Loading…
Reference in a new issue