flake: use filterPackages instead of flattenTreeSystem

This commit is contained in:
Pacman99 2021-03-26 16:33:27 -07:00
parent fb14e20249
commit 58814fe741
2 changed files with 11 additions and 8 deletions

View file

@ -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"
}

View file

@ -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;