mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
13 lines
322 B
Nix
13 lines
322 B
Nix
{ lib }:
|
|
|
|
{
|
|
genFinalPackage =
|
|
pkg: args:
|
|
let
|
|
expectedArgs = 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;
|
|
}
|