Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
12 lines
330 B
Nix
12 lines
330 B
Nix
{ lib }:
|
|
|
|
{
|
|
genFinalPackage = pkg: args:
|
|
let
|
|
expectedArgs = with lib;
|
|
lib.naturalSort (lib.attrNames args);
|
|
existingArgs = with lib;
|
|
naturalSort (intersectLists expectedArgs (attrNames (functionArgs pkg.override)));
|
|
in
|
|
if existingArgs != expectedArgs then pkg else pkg.override args;
|
|
}
|