diff options
Diffstat (limited to 'maintainers')
-rw-r--r-- | maintainers/maintainer-list.nix | 104 | ||||
-rw-r--r-- | maintainers/scripts/build.nix | 43 | ||||
-rwxr-xr-x | maintainers/scripts/update.nix | 79 |
3 files changed, 176 insertions, 50 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 146b038697242..0b789673e3043 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1280,6 +1280,12 @@ githubId = 64804; name = "Dennis Gosnell"; }; + ccellado = { + email = "annplague@gmail.com"; + github = "ccellado"; + githubId = 44584960; + name = "Denis Khalmatov"; + }; ceedubs = { email = "ceedubs@gmail.com"; github = "ceedubs"; @@ -1662,6 +1668,12 @@ } ]; }; + cyplo = { + email = "nixos@cyplo.dev"; + github = "cyplo"; + githubId = 217899; + name = "Cyryl Płotnicki"; + }; d-goldin = { email = "dgoldin+github@protonmail.ch"; github = "d-goldin"; @@ -2038,6 +2050,12 @@ githubId = 108501; name = "David Pflug"; }; + dramaturg = { + email = "seb@ds.ag"; + github = "dramaturg"; + githubId = 472846; + name = "Sebastian Krohn"; + }; drets = { email = "dmitryrets@gmail.com"; github = "drets"; @@ -2476,7 +2494,7 @@ }; evils = { email = "evils.devils@protonmail.com"; - github = "evils-devils"; + github = "evils"; githubId = 30512529; name = "Evils"; }; @@ -4025,12 +4043,6 @@ fingerprint = "8992 44FC D291 5CA2 0A97 802C 156C 88A5 B0A0 4B2A"; }]; }; - kjuvi = { - email = "quentin.vaucher@pm.me"; - github = "kjuvi"; - githubId = 17534323; - name = "Quentin Vaucher"; - }; kkallio = { email = "tierpluspluslists@gmail.com"; name = "Karn Kallio"; @@ -4162,6 +4174,12 @@ githubId = 10544; name = "Giuluo Eulisse"; }; + kthielen = { + email = "kthielen@gmail.com"; + github = "kthielen"; + githubId = 1409287; + name = "Kalani Thielen"; + }; ktor = { email = "kruszewsky@gmail.com"; github = "ktor"; @@ -4615,6 +4633,12 @@ githubId = 2057309; name = "Sergey Sofeychuk"; }; + lynty = { + email = "ltdong93+nix@gmail.com"; + github = "lynty"; + githubId = 39707188; + name = "Lynn Dong"; + }; lyt = { email = "wheatdoge@gmail.com"; name = "Tim Liou"; @@ -5070,6 +5094,12 @@ githubId = 3269878; name = "Miguel Madrid Mencía"; }; + mindavi = { + email = "rol3517@gmail.com"; + github = "Mindavi"; + githubId = 9799623; + name = "Rick van Schijndel"; + }; minijackson = { email = "minijackson@riseup.net"; github = "minijackson"; @@ -5534,6 +5564,12 @@ githubId = 4368690; name = "Ratko Mladic"; }; + nilp0inter = { + email = "robertomartinezp@gmail.com"; + github = "nilp0inter"; + githubId = 1224006; + name = "Roberto Abdelkader Martínez Pérez"; + }; ninjatrappeur = { email = "felix@alternativebit.fr"; github = "ninjatrappeur"; @@ -5796,6 +5832,12 @@ githubId = 15930073; name = "Moritz Scheuren"; }; + pablovsky = { + email = "dealberapablo07@gmail.com"; + github = "pablo1107"; + githubId = 17091659; + name = "Pablo Andres Dealbera"; + }; pacien = { email = "b4gx3q.nixpkgs@pacien.net"; github = "pacien"; @@ -6616,6 +6658,12 @@ githubId = 1942810; name = "Christian Ulrich"; }; + rpearce = { + email = "me@robertwpearce.com"; + github = "rpearce"; + githubId = 592876; + name = "Robert W. Pearce"; + }; rprospero = { email = "rprospero+nix@gmail.com"; github = "rprospero"; @@ -6676,6 +6724,12 @@ githubId = 889991; name = "Ryan Artecona"; }; + ryanorendorff = { + email = "12442942+ryanorendorff@users.noreply.github.com"; + github = "ryanorendorff"; + githubId = 12442942; + name = "Ryan Orendorff"; + }; ryansydnor = { email = "ryan.t.sydnor@gmail.com"; github = "ryansydnor"; @@ -7124,6 +7178,12 @@ githubId = 1505617; name = "Sean Lee"; }; + SlothOfAnarchy = { + email = "slothofanarchy1@gmail.com"; + github = "SlothOfAnarchy"; + githubId = 12828415; + name = "Michel Weitbrecht"; + }; smakarov = { email = "setser200018@gmail.com"; github = "setser"; @@ -7630,12 +7690,6 @@ githubId = 1141680; name = "Thane Gill"; }; - the-kenny = { - email = "moritz@tarn-vedra.de"; - github = "the-kenny"; - githubId = 31167; - name = "Moritz Ulrich"; - }; thedavidmeister = { email = "thedavidmeister@gmail.com"; github = "thedavidmeister"; @@ -7688,12 +7742,24 @@ githubId = 7709; name = "Thomaz Leite"; }; + thomasdesr = { + email = "git@hive.pw"; + github = "thomasdesr"; + githubId = 681004; + name = "Thomas Desrosiers"; + }; ThomasMader = { email = "thomas.mader@gmail.com"; github = "ThomasMader"; githubId = 678511; name = "Thomas Mader"; }; + thomasjm = { + email = "tom@codedown.io"; + github = "thomasjm"; + githubId = 1634990; + name = "Tom McLaughlin"; + }; thoughtpolice = { email = "aseipp@pobox.com"; github = "thoughtpolice"; @@ -8271,6 +8337,12 @@ githubId = 54934; name = "Wout Mertens"; }; + wnklmnn = { + email = "pascal@wnklmnn.de"; + github = "wnklmnn"; + githubId = 9423014; + name = "Pascal Winkelmann"; + }; woffs = { email = "github@woffs.de"; github = "woffs"; @@ -8349,6 +8421,12 @@ githubId = 1297598; name = "Konrad Borowski"; }; + xiorcale = { + email = "quentin.vaucher@pm.me"; + github = "xiorcale"; + githubId = 17534323; + name = "Quentin Vaucher"; + }; xnaveira = { email = "xnaveira@gmail.com"; github = "xnaveira"; diff --git a/maintainers/scripts/build.nix b/maintainers/scripts/build.nix new file mode 100644 index 0000000000000..c70993cf138c9 --- /dev/null +++ b/maintainers/scripts/build.nix @@ -0,0 +1,43 @@ +{ maintainer }: + +# based on update.nix +# nix-build build.nix --argstr maintainer <yourname> + +let + pkgs = import ./../../default.nix {}; + maintainer_ = pkgs.lib.maintainers.${maintainer}; + packagesWith = cond: return: set: + (pkgs.lib.flatten + (pkgs.lib.mapAttrsToList + (name: pkg: + let + result = builtins.tryEval + ( + if pkgs.lib.isDerivation pkg && cond name pkg + then [ (return name pkg) ] + else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false + then packagesWith cond return pkg + else [ ] + ); + in + if result.success then result.value + else [ ] + ) + set + ) + ); +in +packagesWith + (name: pkg: + ( + if builtins.hasAttr "maintainers" pkg.meta + then ( + if builtins.isList pkg.meta.maintainers + then builtins.elem maintainer_ pkg.meta.maintainers + else maintainer_ == pkg.meta.maintainers + ) + else false + ) + ) + (name: pkg: pkg) + pkgs diff --git a/maintainers/scripts/update.nix b/maintainers/scripts/update.nix index 7c45e148e8225..66ea18ddf62e9 100755 --- a/maintainers/scripts/update.nix +++ b/maintainers/scripts/update.nix @@ -9,6 +9,10 @@ # TODO: add assert statements let + pkgs = import ./../../default.nix (if include-overlays then { } else { overlays = []; }); + + inherit (pkgs) lib; + /* Remove duplicate elements from the list based on some extracted value. O(n^2) complexity. */ nubOn = f: list: @@ -16,43 +20,44 @@ let [] else let - x = pkgs.lib.head list; - xs = pkgs.lib.filter (p: f x != f p) (pkgs.lib.drop 1 list); + x = lib.head list; + xs = lib.filter (p: f x != f p) (lib.drop 1 list); in [x] ++ nubOn f xs; - pkgs = import ./../../default.nix (if include-overlays then { } else { overlays = []; }); + packagesWithPath = relativePath: cond: return: pathContent: + let + result = builtins.tryEval pathContent; - packagesWith = cond: return: set: - nubOn (pkg: pkg.updateScript) - (pkgs.lib.flatten - (pkgs.lib.mapAttrsToList - (name: pkg: - let - result = builtins.tryEval ( - if pkgs.lib.isDerivation pkg && cond name pkg - then [(return name pkg)] - else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false - then packagesWith cond return pkg - else [] - ); - in - if result.success then result.value - else [] - ) - set - ) - ); + dedupResults = lst: nubOn (pkg: pkg.updateScript) (lib.concatLists lst); + in + if result.success then + let + pathContent = result.value; + in + if lib.isDerivation pathContent then + lib.optional (cond relativePath pathContent) (return relativePath pathContent) + else if lib.isAttrs pathContent then + # If user explicitly points to an attrSet or it is marked for recursion, we recur. + if relativePath == [] || pathContent.recurseForDerivations or false || pathContent.recurseForRelease or false then + dedupResults (lib.mapAttrsToList (name: elem: packagesWithPath (relativePath ++ [name]) cond return elem) pathContent) + else [] + else if lib.isList pathContent then + dedupResults (lib.imap0 (i: elem: packagesWithPath (relativePath ++ [i]) cond return elem) pathContent) + else [] + else []; + + packagesWith = packagesWithPath []; packagesWithUpdateScriptAndMaintainer = maintainer': let maintainer = - if ! builtins.hasAttr maintainer' pkgs.lib.maintainers then + if ! builtins.hasAttr maintainer' lib.maintainers then builtins.throw "Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`." else - builtins.getAttr maintainer' pkgs.lib.maintainers; + builtins.getAttr maintainer' lib.maintainers; in - packagesWith (name: pkg: builtins.hasAttr "updateScript" pkg && + packagesWith (relativePath: pkg: builtins.hasAttr "updateScript" pkg && (if builtins.hasAttr "maintainers" pkg.meta then (if builtins.isList pkg.meta.maintainers then builtins.elem maintainer pkg.meta.maintainers @@ -61,23 +66,23 @@ let else false ) ) - (name: pkg: pkg) + (relativePath: pkg: pkg) pkgs; packagesWithUpdateScript = path: let - attrSet = pkgs.lib.attrByPath (pkgs.lib.splitString "." path) null pkgs; + pathContent = lib.attrByPath (lib.splitString "." path) null pkgs; in - if attrSet == null then + if pathContent == null then builtins.throw "Attribute path `${path}` does not exists." else - packagesWith (name: pkg: builtins.hasAttr "updateScript" pkg) - (name: pkg: pkg) - attrSet; + packagesWith (relativePath: pkg: builtins.hasAttr "updateScript" pkg) + (relativePath: pkg: pkg) + pathContent; packageByName = name: let - package = pkgs.lib.attrByPath (pkgs.lib.splitString "." name) null pkgs; + package = lib.attrByPath (lib.splitString "." name) null pkgs; in if package == null then builtins.throw "Package with an attribute name `${name}` does not exists." @@ -125,15 +130,15 @@ let packageData = package: { name = package.name; - pname = pkgs.lib.getName package; - updateScript = map builtins.toString (pkgs.lib.toList package.updateScript); + pname = lib.getName package; + updateScript = map builtins.toString (lib.toList package.updateScript); }; packagesJson = pkgs.writeText "packages.json" (builtins.toJSON (map packageData packages)); optionalArgs = - pkgs.lib.optional (max-workers != null) "--max-workers=${max-workers}" - ++ pkgs.lib.optional (keep-going == "true") "--keep-going"; + lib.optional (max-workers != null) "--max-workers=${max-workers}" + ++ lib.optional (keep-going == "true") "--keep-going"; args = [ packagesJson ] ++ optionalArgs; |