Hi, basically the title. I would like to get a list of packages maintained by specified person, how could I achieve that?
1 Like
repology could be useful, e.g. Projects list - Repology
4 Likes
If you have a nixpkgs checkout you can also safe the snippet below to a file, say getmaintainers.nix
and call it with
nix eval --impure -f ./getmaintainers.nix maintained
or
nix eval --impure --expr 'import ./getmaintainers.nix {maintainer = "figsoda";}' maintained
{ pkgs ? import ./. { config.allowBroken = true; }
, maintainer ? "dawidd6"
}: with pkgs.lib;
let mypkgs =
filterAttrs (name: value:
(builtins.tryEval value).success &&
elem maintainers.${maintainer} (value.meta.maintainers or [])
) pkgs;
in
{ maintained = pkgs.lib.mapAttrs (n : v : (v?pname ? v?name) ) mypkgs; }
9 Likes
I am trying to get a list of packages maintained by myself using following code:
with import ./. {};
let
maintainer = pkgs.lib.maintainers.imincik;
pkgMaintainers = pkg: pkg.meta.maintainers or [];
maintains = pkg: builtins.elem maintainer (pkgMaintainers pkg);
robustMaintains = pkg: let result = builtins.tryEval (maintains pkg); in if result.success then result.value else false;
maintainsPackages = pkgs.lib.filterAttrs (name: pkg: robustMaintains pkg) pkgs;
in
builtins.attrNames maintainsPackages
which works for top level packages, but doesn’t work for packages in attribute set - for example python3Packages
.
$ nix eval -f ./maintainer-query.nix
[ "LAStools" "dcw-gmt" "entwine" "gdal" "gdalMinimal" "geos" "geos_3_11" "geoserver" "grass" "gshhg-gmt" "ili2c" "libLAS" "libgeotiff" "libosmium" "librttopo" "libspatialindex" "libspatialite" "libtiff" "mapcache" "mapnik" "mapproxy" "mapserver" "mbtileserver" "openjump" "osm2pgsql" "osmium-tool" "pdal" "pg_featureserv" "pg_tileserv" "pmtiles" "postgis" "proj" "protozero" "qgis" "qgis-ltr" "saga" "shapelib" "spatialite_gui" "stac-validator" "t-rex" "tegola" "tile38" "tippecanoe" "whitebox-tools" ]
I was trying to use filterAttrsRecursive
instead of filterAttrs
but it doesn’t help. Actually, following simple code doesn’t work in repl either
nix-repl> pkgs.lib.filterAttrsRecursive (n: v: n == "fiona") {python = { fiona = {}; };}
Any ideas ?
1 Like