File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 46
46
if pkgs . stdenv . isLinux then pkgs . stdenv
47
47
else if pkgs . stdenv . isDarwin then pkgs . clang18Stdenv
48
48
else throw "Unsupported platform" ;
49
+
49
50
cargoDeps = pkgs . rustPlatform . importCargoLock {
50
51
lockFile = ./src/jit/Cargo.lock ;
51
52
} ;
53
+
54
+ cargoConfigFile = pkgs . writeText "cargo-config.toml" ''
55
+ [source.crates-io]
56
+ replace-with = "vendored-sources"
57
+
58
+ [source.vendored-sources]
59
+ directory = "${ cargoDeps } "
60
+ '' ;
52
61
in
53
62
{
54
63
packages . default = stdenv . mkDerivation
91
100
{
92
101
buildInputs = devShellTools ++ tools ++ libs ;
93
102
shellHook = ''
94
- # So the cargo dependencies get cached offline, just in case
95
- export cargoDeps= ${ cargoDeps }
103
+ mkdir -p ./src/jit/. cargo
104
+ ln -s ${ cargoConfigFile } ./src/jit/.cargo/config.toml
96
105
'' + ( if stdenv . isLinux then ''
97
106
export LD_LIBRARY_PATH="${ pkgs . vulkan-loader } /lib";
98
107
'' else if stdenv . isDarwin then ''
Original file line number Diff line number Diff line change 1
1
target
2
+ .cargo
You can’t perform that action at this time.
0 commit comments