-
-
Save gustavderdrache/cb123a35b07f8152b41d0ca8323a2c3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
defaultRustChannel = target: pkgs.rustChannelOf { | |
rustToolchain = ./rust-toolchain; | |
targets = [ target ]; | |
extensions = [ "rust-std" ]; | |
targetExtensions = [ "rust-std" ]; | |
}; | |
binary = | |
{ rustTarget | |
, features ? configurations.${rustTarget}.features | |
, linking ? "dynamic" | |
, rustChannel ? defaultRustChannel rustTarget | |
, hostPkgs ? pkgs | |
, targetPkgs ? hostPkgs | |
, buildType ? "debug" | |
, logLevel ? "debug" | |
, runCheckPhase ? true | |
}: | |
let | |
defintion = import ./scripts/environment/definition.nix { | |
inherit tools hostPkgs targetPkgs rustTarget; | |
}; | |
/* other code here */ | |
rustPlatform = targetPkgs.makeRustPlatform { | |
inherit (rustChannel) cargo rustc; | |
}; | |
in | |
rustPlatform.buildRustPackage packageDefinition; | |
in | |
/* other code here */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment