generated from cobaltcore-dev/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (55 loc) · 1.66 KB
/
flake.nix
File metadata and controls
62 lines (55 loc) · 1.66 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
{
description = "OpenStack Packages and Modules for NixOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
pre-commit-hooks-nix = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
pre-commit-hooks-nix,
...
}:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (
system:
let
pkgs = import nixpkgs { inherit system; };
pre-commit-hooks-run = pre-commit-hooks-nix.lib.${system}.run;
in
rec {
formatter = pkgs.nixfmt-rfc-style;
devShells.default = pkgs.mkShellNoCC {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
packages = with pkgs; [ gitlint ];
};
lib = {
generateRootwrapConf =
{
package,
filterPath,
execDirs,
}:
pkgs.callPackage ./lib/rootwrap-conf.nix {
inherit package filterPath;
utils_env = execDirs;
};
};
packages = import ./packages { inherit (pkgs) callPackage python3Packages; };
checks = import ./checks { inherit pkgs pre-commit-hooks-run; };
nixosModules = import ./modules { openstackPkgs = packages; };
tests = import ./tests/default.nix {
inherit pkgs nixosModules;
inherit (lib) generateRootwrapConf;
};
}
)
// {
ci = import ./lib/gitlab-ci.nix { input = { inherit (self) packages tests; }; };
};
}