Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4f17851fb2e6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2381bcd86f3b
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 13, 2018

  1. Copy the full SHA
    2381bcd View commit details
Showing with 12 additions and 1 deletion.
  1. +12 −1 maintainers/scripts/update.nix
13 changes: 12 additions & 1 deletion maintainers/scripts/update.nix
Original file line number Diff line number Diff line change
@@ -6,11 +6,22 @@
# TODO: add assert statements

let
/* Remove duplicate elements from the list based on some extracted value. O(n^2) complexity.
*/
nubOn = f: list:
if list == [] then
[]
else
let
x = pkgs.lib.head list;
xs = pkgs.lib.filter (p: f x != f p) (pkgs.lib.drop 1 list);
in
[x] ++ nubOn f xs;

pkgs = import ./../../default.nix { };

packagesWith = cond: return: set:
pkgs.lib.unique
nubOn (pkg: pkg.updateScript)
(pkgs.lib.flatten
(pkgs.lib.mapAttrsToList
(name: pkg: