forked from modelfoxdotdev/modelfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
85 lines (85 loc) · 2.09 KB
/
flake.nix
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
fenix = {
url = "github:nix-community/fenix";
};
};
outputs = { nixpkgs, flake-utils, fenix, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
rust = (with fenix.packages.${system}; combine [
stable.rustc
stable.cargo
stable.clippy-preview
stable.rustfmt-preview
stable.rust-std
targets.wasm32-unknown-unknown.stable.rust-std
stable.rust-src
rust-analyzer
]);
in rec {
defaultApp = flake-utils.lib.mkApp {
drv = defaultPackage;
};
defaultPackage = (pkgs.makeRustPlatform {
rustc = rust;
cargo = rust;
}).buildRustPackage {
pname = "tangram";
version = "0.7.0";
src = ./.;
doCheck = false;
nativeBuildInputs = with pkgs; [
clang_12
lld_12
];
cargoSha256 = "sha256-8mX/RmgE3VmoOBGMWnunucXqT+/7HSYDUcp5wempt3M=";
cargoBuildFlags = [ "--bin" "tangram" ];
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = "clang";
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
cachix
cargo-insta
clang_12
createrepo_c
doxygen
dpkg
elixir
go
lld_12
mold
nodejs-16_x
(python39.withPackages(ps: with ps; [
catboost
lightgbm
numpy
pandas
pytorch
scikitlearn
xgboost
]))
rpm
ruby
rust
rust-cbindgen
sequoia
sqlite
time
wasm-bindgen-cli
];
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = toString ./. + "/scripts/clang";
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
};
}
);
}