Nixpkgs: Packages with a string instead of a list as maintainers

Created on 3 Jan 2017  路  2Comments  路  Source: NixOS/nixpkgs

Issue description

I just found that at least 11 packages that break the assumption that pkg.meta.maintainers is a list of strings.There could be more in packages that do not evaluate and/or are broken.

Not sure if that this is something that should be allowed. It might break automated tooling (or at least add extra complexity that is just needed for these packages)

Steps to reproduce

#usage: 
# nix-instantiate  --strict --json --eval ./detect-non-list-maintainers.nix | $(nix-build '<nixpkgs>' -A jq)/bin/jq

with (import <nixpkgs> {});
with lib;

let 
  filter = k: v: 
  let
    evalResult = builtins.tryEval (
      if (builtins.typeOf v) == "set" && (builtins.hasAttr "meta" v) && (builtins.hasAttr "maintainers" v.meta) 
      then if (builtins.typeOf v.meta.maintainers) == "list"
           then false
           else true
      else false
    );
  in
    if evalResult.success 
    then evalResult.value
    else false;
  nonListMaintainers = filterAttrs filter pkgs;
in
mapAttrs(k: v: v.meta.maintainers) nonListMaintainers
 nix-instantiate --eval --strict --json ./detect-non-list-maintainers.nix  | $(nix-build '<nixpkgs>' -A jq)/bin/jq
{
  "compton-git": "Ertugrul S枚ylemez <[email protected]>",
  "elfutils": "Eelco Dolstra <[email protected]>",
  "iops": "David Kleuker <[email protected]>",
  "linux_mptcp": "Guillaume Maudoux <[email protected]>",
  "multimc": "Michael Bishop <[email protected]>",
  "netcdffortran": "Bruno Bzeznik <[email protected]>",
  "pws": "Rafa艂 艁asocha <[email protected]>",
  "reckon": "[email protected]",
  "softhsm": "Michiel Leenaars <[email protected]>",
  "synapse": "Matthias Herrmann <[email protected]>",
  "telegram-purple": "Arseniy Seroka <[email protected]>"
}

Technical details

Ran on nixos stable

good-first-bug

Most helpful comment

Hi, this was already fixed in master some time ago. https://github.com/NixOS/nixpkgs/commit/f7e0bc2ae7333c29f3d0c7120f65297d491b63e9.

All 2 comments

Note that nixpkgs-lint doesn't detect this condition, but it is documented to be a list.

Hi, this was already fixed in master some time ago. https://github.com/NixOS/nixpkgs/commit/f7e0bc2ae7333c29f3d0c7120f65297d491b63e9.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthiasbeyer picture matthiasbeyer  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

tomberek picture tomberek  路  3Comments

copumpkin picture copumpkin  路  3Comments

chris-martin picture chris-martin  路  3Comments