forked from lf-lang/reactor-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (61 loc) · 2.16 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
{
description = "test and build script for the reactor-cpp runtime";
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
lf-benchmark-runner = {
url = "github:revol-xut/lf-benchmark-runner";
};
# input for the reactor-cpp
reactor-cpp = {
url = "github:lf-lang/reactor-cpp";
flake = false;
};
# source for the lingu franca compiler
lingua-franca-src = {
url = "https://github.com/lf-lang/lingua-franca/releases/download/v0.3.0/lfc_0.3.0.tar.gz";
flake = false;
};
# determines the the lingua-franca version from which the test are taken from
lingua-franca-tests = {
url = "github:lf-lang/lingua-franca";
flake = false;
};
# repo that contains the benchmarks
lingua-franca-benchmarks = {
url = "github:lf-lang/benchmarks-lingua-franca";
flake = false;
};
};
outputs = { utils, nixpkgs, lf-benchmark-runner, reactor-cpp, lingua-franca-src, lingua-franca-tests, lingua-franca-benchmarks, ... }@inputs:
utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
allTests = (pkgs.callPackage ./nix/test.nix {
reactor-cpp-src = reactor-cpp;
lingua-franca-src = lingua-franca-src;
lingua-franca-tests = lingua-franca-tests;
});
allBenchmarks = pkgs.callPackage ./nix/benchmark.nix {
reactor-cpp-src = reactor-cpp;
lingua-franca-src = lingua-franca-src;
lingua-franca-benchmarks = lingua-franca-benchmarks;
lf-benchmark-runner = lf-benchmark-runner.packages."${system}".lf-benchmark-runner;
rev-reactor = reactor-cpp.narHash;
rev-lingua-franca = lingua-franca-src.narHash;
};
customPackages = allBenchmarks // allTests // rec {
reactor-cpp = pkgs.callPackage ./nix/reactor-cpp.nix {
mkDerivation = pkgs.stdenv.mkDerivation;
debug = false;
reactor-cpp-src = ./.;
};
default = reactor-cpp;
};
in
rec {
checks = packages;
packages = customPackages;
}
);
}