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" "fortify" "stackprotector" "pic" "strictoverflow" "format" "relro" "bindnow"
]; ];
hardeningDisable = hardeningDisable = lib.toList (attrs.hardeningDisable or [ ]);
let val = attrs.hardeningDisable or [ ];
in if builtins.isList val then val else [ val ];
hardeningEnable = hardeningEnable = lib.toList (attrs.hardeningEnable or [ ]);
let val = attrs.hardeningEnable or [ ];
in if builtins.isList val then val else [ val ];
enabledHardeningOptions = enabledHardeningOptions =
if builtins.elem "all" hardeningDisable if builtins.elem "all" hardeningDisable