fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMove platform check into modules5f433eb1

master
376 B14 linesraw
1{ lib }:
2
3{
4  assertPlatform = module: pkgs: platforms: {
5    assertion = lib.elem pkgs.stdenv.hostPlatform.system platforms;
6    message = let
7      platformsStr = lib.concatStringsSep "\n"
8        (map (p: "  - ${p}") (lib.sort (a: b: a < b) platforms));
9    in ''
10      The module ${module} does not support your platform. It only supports
11
12      ${platformsStr}'';
13  };
14}