Update single package locally

I guess this is a basic question, but I haven’t found out how to do this.

I want to update the version of a single package - https://github.com/NixOS/nixpkgs/blob/adaf0714abcb368b44f5d17301fddf482753de3e/pkgs/development/beam-modules/elixir-ls/default.nix

my idea was to copy this default.nix locally, add an overlay and be ready. But then I got errors about fetchMixDeps being a required argument and not being passed in.

So how do I add an overlay for this file only and keep all the default arguments?

the solution is to add the correct dependencies like this:

          overlays = [
              (final: _:                 {
                elixir-ls = final.callPackage ./elixir-ls.nix { fetchMixDeps = beamPackages.fetchMixDeps; mixRelease = beamPackages.mixRelease; };
                }
              )
          ];
2 Likes