-
Notifications
You must be signed in to change notification settings - Fork 11
/
flake.nix
47 lines (43 loc) · 1.77 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
{
description = "Flake for Holochain app development";
inputs = {
versions.url = "github:holochain/holochain?dir=versions/weekly";
holochain-flake = {
url = "github:holochain/holochain";
inputs.versions.follows = "versions";
};
nixpkgs.follows = "holochain-flake/nixpkgs";
};
outputs = inputs @ { ... }:
inputs.holochain-flake.inputs.flake-parts.lib.mkFlake { inherit inputs; }
{
systems = builtins.attrNames inputs.holochain-flake.devShells;
perSystem = { config, pkgs, system, ... }: {
devShells.default = pkgs.mkShell {
inputsFrom = [
inputs.holochain-flake.devShells.${system}.rustDev
];
packages = with pkgs; [
# These packages and env vars are required to build Wasmer with the 'wamr' feature (i.e. the hc-wasmer dependency)
cmake
clang
llvmPackages.libclang.lib
# These packages are required to build Wasmer with the production config
llvm_15
libffi
libxml2
zlib
ncurses
];
# Used by `wamr`
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
# Used by wasmer production config
shellHook = ''
# This binary lives in a different derivation to `llvm_15` and isn't re-exported through that derivation
export LLVM_SYS_150_PREFIX=$(which llvm-config | xargs dirname | xargs dirname)
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.libffi}/lib:${pkgs.zlib}/lib:${pkgs.ncurses}/lib"
'';
};
};
};
}