mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
14 lines
332 B
Nix
14 lines
332 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;
|
||
|
}
|