forked from HigherOrderCO/HVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
60 lines (60 loc) · 1.65 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
{
description = "A massively parallel functional runtime.";
inputs = {
flake-compat = {
flake = false;
url = "github:edolstra/flake-compat";
};
nci = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:yusdacra/nix-cargo-integration";
};
nix-filter.url = "github:numtide/nix-filter";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs: let
nix-filter = import inputs.nix-filter;
pkgs = common: packages: builtins.map (element: common.pkgs.${element}) packages;
in
inputs.nci.lib.makeOutputs {
config = common: {
cCompiler = {
enable = true;
package = common.pkgs.clang;
};
outputs = {
defaults = {
app = "hvm";
package = "hvm";
};
};
runtimeLibs = pkgs common ["openssl"];
shell = {commands = builtins.map (element: {package = common.pkgs.${element};}) ["ghc" "nodejs"];};
};
pkgConfig = common: let
override = {buildInputs = pkgs common ["openssl" "pkg-config"];};
in {
hvm = {
app = true;
build = true;
overrides = {inherit override;};
depsOverrides = {inherit override;};
profiles = {
dev = false;
dev_fast = false;
release = false;
};
};
};
# Only include directories necessary for building the project, to make the derivation smaller.
root = nix-filter {
root = ./.;
include = [
./src
./Cargo.lock
./Cargo.toml
./rust-toolchain.toml
];
};
};
}