# This file defines overlays { inputs, ... }: let addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ patches; }); in { # Add our custom packages from the 'pkgs' directory additions = final: prev: import ../pkgs { pkgs = final; } // { formats = prev.formats // import ../pkgs/formats { pkgs = final; }; vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { }; }; # Modify existing packages; change versions, add patches, set compilation # flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = _final: prev: { # example = prev.example.overrideAttrs (oldAttrs: rec { # ... # }); passExtensions = prev.passExtensions // { # https://github.com/tadfisher/pass-otp/pull/173 pass-otp = addPatches prev.passExtensions.pass-otp [ ./pass-otp-fix-completion.patch ]; }; # https://github.com/mdellweg/pass_secret_service/pull/37 pass-secret-service = addPatches prev.pass-secret-service [ ./pass-secret-service-native.diff ]; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will # be accessible through 'pkgs.unstable' unstable-packages = final: _prev: { unstable = import inputs.nixpkgs-unstable { inherit (final) system; config.allowUnfree = true; }; }; }