diff --git a/pkgs/overlays/unstable-from-source.nix b/pkgs/overlays/unstable-from-source.nix index 7ff3cae..cd2ac95 100644 --- a/pkgs/overlays/unstable-from-source.nix +++ b/pkgs/overlays/unstable-from-source.nix @@ -7,15 +7,6 @@ self: super: -assert self.lib.assertMsg ( - self.lib.isFunction callPackage - || self.lib.isBool callPackage -) '' - callPackage argument should be a function or a boolean. - If you want to use the callPackage from self, set it to true. - If you want to use a custom callPackage, set it to a function (pkgs.callPackage). -''; - let useUnstable = self.config.useUnstable or true; sanitizePlatform = platformConfig: self.lib.removeAttrs platformConfig [ @@ -49,7 +40,11 @@ let callPackage' = if builtins.isFunction callPackage then callPackage else if builtins.isBool callPackage && callPackage then self.callPackage else if builtins.isBool callPackage && !callPackage then throw "this should never be evaluated" - else throw "callPackage should be a function (callPackage) or a boolean"; + else throw '' + callPackage argument should be a function or a boolean. + If you want to use the callPackage from self, set it to true. + If you want to use a custom callPackage, set it to a function (pkgs.callPackage). + ''; callPackagesUnstablePkgs = self.lib.mapAttrsRecursiveCond ( attrset: !(self.lib.hasAttr "override" attrset) && attrset.recurseForDerivations or false @@ -68,6 +63,6 @@ in { "${attributeName}" = if !useUnstable then self # if callPackage is not false - else if builtins.isBool callPackage && !callPackage then callPackagesUnstablePkgs + else if !(builtins.isBool callPackage && !callPackage) then callPackagesUnstablePkgs else unstablePkgs; }