mirror of
https://github.com/divnix/digga.git
synced 2024-12-23 16:11:51 +03:00
deploy: 5a3bae7be5
This commit is contained in:
parent
2baf7578c0
commit
2f3577a6d7
@ -260,16 +260,15 @@
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1608663846,
|
||||
"narHash": "sha256-YOAXeoNLW0IubQ6AZLGuSj5kAD5n4DYXLYReLtyds1A=",
|
||||
"lastModified": 1614513358,
|
||||
"narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a68df93a37cd5137ac22ffeb2d8a03acf253cc24",
|
||||
"rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"ref": "flatten-tree-system",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
|
12
flake.nix
12
flake.nix
@ -23,7 +23,7 @@
|
||||
naersk.url = "github:nmattia/naersk";
|
||||
naersk.inputs.nixpkgs.follows = "override";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
utils.url = "github:numtide/flake-utils/flatten-tree-system";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
pkgs.url = "path:./pkgs";
|
||||
pkgs.inputs.nixpkgs.follows = "nixos";
|
||||
};
|
||||
@ -70,7 +70,11 @@
|
||||
};
|
||||
|
||||
systemOutputs = utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = multiPkgs.${system}; in
|
||||
let
|
||||
pkgs = multiPkgs.${system};
|
||||
# all packages that are defined in ./pkgs
|
||||
legacyPackages = os.mkPackages { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
checks =
|
||||
let
|
||||
@ -82,8 +86,8 @@
|
||||
in
|
||||
nixos.lib.recursiveUpdate tests deployChecks;
|
||||
|
||||
packages = utils.lib.flattenTreeSystem system
|
||||
(os.mkPackages { inherit pkgs; });
|
||||
inherit legacyPackages;
|
||||
packages = lib.filterPackages system legacyPackages;
|
||||
|
||||
devShell = import ./shell {
|
||||
inherit self system;
|
||||
|
@ -28,4 +28,13 @@ rec {
|
||||
});
|
||||
|
||||
concatAttrs = lib.fold (attr: sum: lib.recursiveUpdate sum attr) { };
|
||||
|
||||
# Filter out packages that support given system and follow flake check requirements
|
||||
filterPackages = system: packages:
|
||||
let
|
||||
# Everything that nix flake check requires for the packages output
|
||||
filter = (n: v: with v; let platforms = meta.hydraPlatforms or meta.platforms or [ ]; in
|
||||
lib.isDerivation v && !meta.broken && builtins.elem system platforms);
|
||||
in
|
||||
lib.filterAttrs filter packages;
|
||||
}
|
||||
|
@ -17,7 +17,8 @@ lib.makeExtensible (final:
|
||||
lists = callLibs ./lists.nix;
|
||||
strings = callLibs ./strings.nix;
|
||||
|
||||
inherit (attrs) mapFilterAttrs genAttrs' pathsToImportedAttrs concatAttrs;
|
||||
inherit (attrs) mapFilterAttrs genAttrs'
|
||||
pathsToImportedAttrs concatAttrs filterPackages;
|
||||
inherit (lists) pathsIn;
|
||||
inherit (strings) rgxToString;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user