feat(rust): initialised cargo
This commit is contained in:
parent
2df4bdc9ed
commit
900a9b8e42
9 changed files with 121 additions and 0 deletions
22
nix/package.nix
Normal file
22
nix/package.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
stdenvAdapters,
|
||||
llvm,
|
||||
}: let
|
||||
toml = (lib.importTOML ../Cargo.toml).package;
|
||||
pname = toml.name;
|
||||
inherit (toml) version;
|
||||
in
|
||||
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
||||
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
||||
|
||||
inherit pname version;
|
||||
|
||||
src = builtins.path {
|
||||
name = "${pname}-${version}";
|
||||
path = lib.sources.cleanSource ../.;
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ../Cargo.lock;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue