Skip to content

Commit 4727f24

Browse files
committed
pkgs: filter by platform
1 parent 224f7d2 commit 4727f24

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

5pkgs/flake-module.nix

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
perSystem =
44
{ lib, pkgs, ... }:
55
{
6-
packages = lib.packagesFromDirectoryRecursive {
7-
inherit (pkgs) callPackage;
8-
directory = ./.;
9-
};
6+
packages =
7+
let
8+
allPackages = lib.packagesFromDirectoryRecursive {
9+
inherit (pkgs) callPackage;
10+
directory = ./.;
11+
};
12+
in
13+
lib.filterAttrs (
14+
name: pkg: name != "flake-module" && lib.meta.availableOn pkgs.stdenv.hostPlatform pkg
15+
) allPackages;
1016
};
1117
}

0 commit comments

Comments
 (0)