I am a beginner with nix and I try my 1st overlay 
I just try to update terminus with an old version to the latest.
The following overlay does not seem to work due to a missing library (libgtk-3.so.0):
self: super: {
terminus = super.terminus.overrideAttrs (oldAttrs: rec {
pname = oldAttrs.pname;
version = "1.0.105";
src = super.fetchurl {
url = "https://github.com/Eugeny/terminus/releases/download/v${version}/terminus-${version}-linux.deb";
sha256 = "1wqwawz6c4dp5zw2aa0z8wqj3nnri06mckb1vw2q5l3ifzlv7k8c";
};
});
}
$ nix-env -i terminus
installing 'terminus-1.0.105'
building '/nix/store/9nnk4knc0vva9ixrlg7dq8gqy710nbxy-user-environment.drv'...
created 429 symlinks in user environment
$ terminus
/home/gigix/VSCode-Anywhere/apps/vscode-anywhere/home/.nix-profile/bin/terminus: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
I try to add libgtk-3.so.0 without success with adding:
buildInputs = oldAttrs.buildInputs ++ [ self.gtk3-x11 ];
Or
buildInputs = oldAttrs.buildInputs ++ [ self.gnome3.gtk ];
I was playing around with Terminus in a local overlay (~/.config/nixpkgs/overlays
) and got v1.0.104 to work. I used a very different approach, however, but maybe something in it will help you solve your problem.
The nix file loaded by the overlay (~/.config/nixpkgs/overlays/default.nix
) is here:
https://bitbucket.org/necopinus/dotfiles/src/b29c0a786d4f11569f1fd576bb7c0d19bd738336/nixpkgs/overlays/default.nix
The Terminus derivation is just a lightly modified version of the nix file from Nix’s git repo:
https://bitbucket.org/necopinus/dotfiles/src/b29c0a786d4f11569f1fd576bb7c0d19bd738336/nixpkgs/overlays/pkgs/terminus/default.nix
I’m still very much learning Nix, so very curious how to solve this problem in the context of your approach!
Thank you for your reply, it works with your solution but it rewrites all the configuration.
I think it could be working with override.
I also try this but it doesn’t work:
self: super:
{
terminus_overrideAttrs = super.terminus.overrideAttrs (oldAttrs: rec {
pname = oldAttrs.pname;
version = "1.0.105";
src = super.fetchurl {
url = "https://github.com/Eugeny/terminus/releases/download/v${version}/terminus-${version}-linux.deb";
sha256 = "1wqwawz6c4dp5zw2aa0z8wqj3nnri06mckb1vw2q5l3ifzlv7k8c";
};
libPath = super.stdenv.lib.makeLibraryPath [
super.stdenv.cc.cc super.gtk3 super.atk super.at-spi2-core super.at-spi2-atk super.glib super.libsecret super.pango super.gdk-pixbuf super.cairo super.freetype super.fontconfig super.dbus
super.xorg.libXi super.xorg.libXcursor super.xorg.libXdamage super.xorg.libXrandr super.xorg.libXcomposite super.xorg.libXext super.xorg.libXfixes super.xorg.libxcb
super.xorg.libXrender super.xorg.libX11 super.xorg.libXtst super.xorg.libXScrnSaver super.gnome3.dconf super.nss super.nspr super.alsaLib super.cups super.expat super.systemd super.libpulseaudio
];
});
}