-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (63 loc) · 2.25 KB
/
flake.nix
File metadata and controls
63 lines (63 loc) · 2.25 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 = "My personal NUR repository";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.ciSubsetName = {
url = "file+file:///dev/null";
flake = false;
};
inputs.ciCachedBuildFailures = {
url = "file+file:///dev/null";
flake = false;
};
# Disabled for now to get rid of the warning - just add the cache manually
# nixConfig = {
# extra-substituters = ["https://rhys-t.cachix.org"];
# extra-trusted-public-keys = ["rhys-t.cachix.org-1:u01ifDlaQjvJbtMT1Saw+oaFX1Lf/Urw+ND0i/L4kgw="];
# };
outputs = { self, nixpkgs, ciSubsetName, ciCachedBuildFailures }:
let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
"armv6l-linux"
"armv7l-linux"
];
forAllSystems = f: lib.genAttrs systems (system: f system);
ciSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
# forAllCISystems = f: lib.genAttrs ciSystems (system: f system);
in
{
legacyPackages = forAllSystems (system: import ./default.nix {
pkgs = import nixpkgs { inherit system; };
} // lib.optionalAttrs (builtins.elem system ciSystems) {
ci = let
subsetName = lib.pipe ciSubsetName.outPath [
(x: if lib.pathIsDirectory x then x+"/ciSubsetName" else x)
(builtins.readFile)
(x: if x == "" then "all" else x)
];
cachedBuildFailures' = ciCachedBuildFailures.outPath;
cachedBuildFailures = if lib.pathIsDirectory cachedBuildFailures' then cachedBuildFailures' else null;
ci = import ./ci.nix {
pkgs = import nixpkgs {
inherit system;
config.allowAliases = false;
config.allowDeprecatedx86_64Darwin = true;
};
inherit subsetName cachedBuildFailures;
};
in ci;
});
packages = forAllSystems (system: lib.filterAttrs (_: v: lib.isDerivation v) self.legacyPackages.${system});
apps = forAllSystems (system: lib.concatMapAttrs (name: value: (value._Rhys-T.flakeApps or (name: value: {})) name value) self.packages.${system});
};
}