forked from LibertyDSNP/substrate-client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
35 lines (28 loc) · 1.03 KB
/
flake.nix
File metadata and controls
35 lines (28 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
description = "Environment flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
mkLinkerPath = {cc, ...}: "${cc}/bin/${cc.targetPrefix}cc";
in
{
devShells.default = with pkgs; mkShell {
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = mkLinkerPath pkgsCross.aarch64-multiplatform.stdenv;
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = mkLinkerPath pkgsCross.gnu64.stdenv;
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER = mkLinkerPath pkgsCross.mingwW64.stdenv;
# for mingw compilation
PTHREAD_LOCATION = "${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
shellHook = "rustup show";
packages = [
temurin-bin-8
rustup
];
};
}
);
}