mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 09:47:52 +00:00
Returns true if the parameter is not a derivation or if trying to evaluate the derivation would fail.
15 lines
263 B
Nix
15 lines
263 B
Nix
{lib, myLib, ...}:
|
|
with lib;
|
|
rec {
|
|
isBroken = x:
|
|
let
|
|
tryX = builtins.tryEval x;
|
|
in
|
|
if
|
|
tryX.success && (isDerivation tryX.value)
|
|
then
|
|
tryX.value.meta.insecure || tryX.value.meta.broken
|
|
else
|
|
true
|
|
;
|
|
}
|