forked from mirrors/nixpkgs
Merge pull request #25427 from aneeshusa/fix-meta-priority-types
Fix meta priority types
This commit is contained in:
commit
e057e5927e
|
@ -45,7 +45,7 @@ rec {
|
|||
/* Decrease the nix-env priority of the package, i.e., other
|
||||
versions/variants of the package will be preferred.
|
||||
*/
|
||||
lowPrio = drv: addMetaAttrs { priority = "10"; } drv;
|
||||
lowPrio = drv: addMetaAttrs { priority = 10; } drv;
|
||||
|
||||
|
||||
/* Apply lowPrio to an attrset with derivations
|
||||
|
@ -56,7 +56,7 @@ rec {
|
|||
/* Increase the nix-env priority of the package, i.e., this
|
||||
version/variant of the package will be preferred.
|
||||
*/
|
||||
hiPrio = drv: addMetaAttrs { priority = "-10"; } drv;
|
||||
hiPrio = drv: addMetaAttrs { priority = -10; } drv;
|
||||
|
||||
|
||||
/* Apply hiPrio to an attrset with derivations
|
||||
|
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||
longDescription = ''The NCBI Bioinformatics toolsbox, including command-line utilties, libraries and include files. No X11 support'';
|
||||
homepage = http://www.ncbi.nlm.nih.gov/IEB/ToolBox/;
|
||||
license = "GPL";
|
||||
priority = "5"; # zlib.so gives a conflict with zlib
|
||||
priority = 5; # zlib.so gives a conflict with zlib
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ let
|
|||
|
||||
checkMetaAttr = k: v:
|
||||
if metaTypes?${k} then
|
||||
if metaTypes.${k}.check v then null else "key '${k}' has a value of an invalid type; expected ${metaTypes.${k}.description}"
|
||||
if metaTypes.${k}.check v then null else "key '${k}' has a value ${v} of an invalid type ${builtins.typeOf v}; expected ${metaTypes.${k}.description}"
|
||||
else "key '${k}' is unrecognized; expected one of: \n\t [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]";
|
||||
checkMeta = meta: if shouldCheckMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue