Skip to content

Instantly share code, notes, and snippets.

@markuskowa
Created August 7, 2019 21:13
Show Gist options
  • Save markuskowa/c62ab264b4db6d084372f02c5a023aea to your computer and use it in GitHub Desktop.
Save markuskowa/c62ab264b4db6d084372f02c5a023aea to your computer and use it in GitHub Desktop.
with builtins;
let
pkgs = import ../nixpkgs { overlays = []; config={oraclejdk.accept_license = true;}; };
# clean evals
cc1 = pkgs.lib.mapAttrs (n: v: (builtins.tryEval v).value ) (pkgs.recurseIntoAttrs pkgs);
# Only top level derivations
cc2 = pkgs.lib.filterAttrs (n: v: pkgs.lib.isDerivation v) cc1;
# Filter for meta tags
cc3 = pkgs.lib.filterAttrs (n: v: v ? "meta") cc2;
noMaint = with pkgs.lib; concatStringsSep "\n"
(
mapAttrsToList (name: v: "${v.meta.position}") (
filterAttrs (n: v: (! hasAttr "maintainers" v.meta) && (hasAttr "position" v.meta) ) cc3
)
);
in pkgs.runCommand "missing-maintainers"
{}
''
mkdir $out
cat << EOF > $out/unsorted
${noMaint}
EOF
cat $out/unsorted | sort | uniq > $out/unique
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment