forked from tenzir/tenzir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (61 loc) · 2.15 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
{
description = "VAST as a standalone app or NixOS module";
nixConfig = {
extra-substituters = "https://vast.cachix.org";
extra-trusted-public-keys = "vast.cachix.org-1:0L8rErLUuFAdspyGYYQK3Sgs9PYRMzkLEqS2GxfaQhA=";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/c4998c7bf6c84e3f5d7abe63a6ea8d110c2dbd95";
inputs.flake-compat.url = "github:edolstra/flake-compat";
inputs.flake-compat.flake = false;
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nix-filter.url = "github:numtide/nix-filter";
outputs = { self, nixpkgs, flake-utils, nix-filter, flake-compat }@inputs: {
nixosModules.vast = {
imports = [
./nix/module.nix
];
_module.args = {
inherit (self.packages."x86_64-linux") vast;
};
};
} // flake-utils.lib.eachSystem ["x86_64-linux"] (system:
let
overlay = import ./nix/overlay.nix { inherit inputs; };
pkgs = nixpkgs.legacyPackages."${system}".appendOverlays [ overlay ];
in
rec {
inherit pkgs;
packages = flake-utils.lib.flattenTree {
vast = pkgs.vast;
vast-ci = pkgs.vast-ci;
vast-static = pkgs.pkgsStatic.vast;
vast-ci-static = pkgs.pkgsStatic.vast-ci;
staticShell = pkgs.mkShell {
buildInputs = with pkgs; [
git nixUnstable coreutils nix-prefetch-github
];
};
default = pkgs.vast;
};
apps.vast = flake-utils.lib.mkApp { drv = packages.vast; };
apps.vast-static = flake-utils.lib.mkApp { drv = packages.vast-static; };
apps.default = apps.vast;
devShell = import ./shell.nix { inherit pkgs; };
hydraJobs = { inherit packages; } // (
let
vast-vm-tests = nixpkgs.legacyPackages."${system}".callPackage ./nix/nixos-test.nix
{
# FIXME: the pkgs channel has an issue made the testing creashed
makeTest = import (nixpkgs.outPath + "/nixos/tests/make-test-python.nix");
inherit self pkgs;
};
in
pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
inherit (vast-vm-tests)
vast-vm-systemd
;
}
);
}
);
}