-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
59 lines (54 loc) · 1.34 KB
/
shell.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
let
pkgs = import <nixpkgs> {};
zig = pkgs.stdenv.mkDerivation {
name = "zig";
src = fetchTarball (
if (pkgs.system == "x86_64-linux") then {
url = "https://ziglang.org/builds/zig-linux-x86_64-0.14.0-dev.1694+3b465ebec.tar.xz";
sha256 = "13nby79647bzwvkiygfhvpnq1vv8r3j9snsrvjyj3drl6p9mk8d2";
} else
throw ("Unknown system " ++ pkgs.system)
);
dontConfigure = true;
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
mv ./* $out/
mkdir -p $out/bin
mv $out/zig $out/bin
'';
};
mlc = pkgs.stdenv.mkDerivation {
name = "mlc";
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
src = builtins.fetchurl (
if (pkgs.system == "x86_64-linux") then {
url = "https://downloadmirror.intel.com/834254/mlc_v3.11b.tgz";
sha256 = "0918xgpwid4j5wgx96sv0xgj020s60w3kif9ckamkbs5s4kvsnjx";
} else
throw ("Unknown system " ++ pkgs.system)
);
unpackPhase = ''
tar -xzf $src
'';
dontConfigure = true;
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
mkdir -p $out/bin
mv ./Linux/mlc $out/bin/mlc
'';
};
in
pkgs.mkShell rec {
nativeBuildInputs = [
zig
pkgs.cargo
pkgs.wasmtime
mlc
];
buildInputs = [
];
}