-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (60 loc) · 1.98 KB
/
flake.nix
File metadata and controls
63 lines (60 loc) · 1.98 KB
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
{
description = "flare";
nixConfig = {
bash-prompt = "\[\\e[1m\\e[32mdev-flare\\e[0m:\\w\]\n$ ";
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?rev=fe977679240ac2027b151ecca1bc6ce808c2e8af";
flake-utils.url = "github:numtide/flake-utils";
flare-tests.url = "github:gree/flare-tests";
flare-tests.inputs.nixpkgs.follows = "nixpkgs";
flare-tests.inputs.flake-utils.follows = "flake-utils";
flare-tools.url = "github:gree/flare-tools?rev=a4df2e32743bd803ed2d8ad4ba3925cbaccbdb1f";
flare-tools.inputs.nixpkgs.follows = "nixpkgs";
flare-tools.inputs.flake-utils.follows = "flake-utils";
};
outputs = { self
, nixpkgs
, flake-utils
, flare-tests
, flare-tools
, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs {inherit system;};
flare-tests-exe = flare-tests.packages.${system}.flare-tests;
flare-tools-exe = flare-tools.packages.${system}.flare-tools;
flare = import ./nix/default.nix {
inherit pkgs;
inherit system;
flare-tests = flare-tests-exe;
};
shell = import ./nix/shell.nix {
inherit pkgs;
inherit system;
flare-tools = flare-tools-exe;
flare-tests = flare-tests-exe;
};
test-flare = with pkgs; runCommand "test-flare" {
buildInputs = [
flare
flare-tests-exe
];
} ''
mkdir -p $out/
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols
export LD_PRELOAD=${libredirect}/lib/libredirect.so
flare-tests
unset NIX_REDIRECTS LD_PRELOAD
touch $out/done
'';
in {
# Exported packages.
defaultPackage = flare;
packages = {
inherit flare;
inherit test-flare;
};
devShell = shell;
}
);
}