hardening: use lib.toList

This commit is contained in:
Charles Strahan 2017-08-08 07:13:21 -04:00
parent 9fe17b2153
commit 9783a677f3
No known key found for this signature in database
GPG key ID: BB47AB4B8489B5A5

View file

@ -119,13 +119,9 @@ rec {
"fortify" "stackprotector" "pic" "strictoverflow" "format" "relro" "bindnow"
];
hardeningDisable =
let val = attrs.hardeningDisable or [ ];
in if builtins.isList val then val else [ val ];
hardeningDisable = lib.toList (attrs.hardeningDisable or [ ]);
hardeningEnable =
let val = attrs.hardeningEnable or [ ];
in if builtins.isList val then val else [ val ];
hardeningEnable = lib.toList (attrs.hardeningEnable or [ ]);
enabledHardeningOptions =
if builtins.elem "all" hardeningDisable