Fetch from github dependencies, conky

In my home-manager config I am trying to install a newer version of conky (hopefully to fix the graphs not having the correct colour) but it does not install dependencies. My config is:

{ pkgs, scripts, ... }:

let
  customConky = pkgs.conky.overrideAttrs (oldAttrs: rec {
    version = "1.21.0";
    src = pkgs.fetchFromGitHub {
      owner = "brndnmtthws";
      repo = "conky";
      rev = "v${version}";
      sha256 = "0hz2wpbsb6f9lvm9dij6pz8l4h4sj2ll630yd1rm6wfnblbsmgz4";
    };
  });
in 
{
  home.packages = with pkgs; [
    ...
    customConky
  ];
}

running home-manager switch results in this error:

...
       > -- Found Fontconfig: /nix/store/ky4chw5yg9n9rrljxaiahqmmvzrpds31-fontconfig-2.15.0-lib/lib/libfontconfig.so (found version "2.15.0")
       > CMake Error at cmake/ConkyPlatformChecks.cmake:425 (message):
       >   Unable to find Xinput library
       > Call Stack (most recent call first):
       >   CMakeLists.txt:35 (include)
       >
       > 
       > -- Configuring incomplete, errors occurred!
       For full logs, run 'nix log /nix/store/2nycha3xhig4v124rivnld3nzwla7b32-conky-1.21.0.drv'.
error: 1 dependencies of derivation '/nix/store/xhz33hpnq0ncxj61q32y796991innxqn-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jsblics5506v55ffd9awa86xamd03jxc-home-manager-generation.drv' failed to build

how do I include these dependencies to fix this? I tried adding xorg.xinput to my package list, but to no avail

Remove it.
You need to modify your override to use it.
In addition to src and version, also add in something like

buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.xorg.xinput ];

Of course this may not be sufficient, I didn’t test it, but this is the direction to start looking in.

This is the completed config that works

let
  customConky = pkgs.conky.overrideAttrs (oldAttrs: rec {
    version = "1.21.0";
    buildInputs = (oldAttrs.buildInputs) ++ [
      pkgs.xorg.libXi
      pkgs.gperf
    ];
    cmakeFlags = oldAttrs.cmakeFlags ++ [
      "-DBUILD_X11=ON"
    ];
    src = pkgs.fetchFromGitHub {
      owner = "brndnmtthws";
      repo = "conky";
      rev = "v${version}";
      sha256 = "0hz2wpbsb6f9lvm9dij6pz8l4h4sj2ll630yd1rm6wfnblbsmgz4";
    };
  });
in { ... }
2 Likes

Does this build with Nvidia support?

I don’t know, I checked my setup it did not say anything about Nvidia. I don’t run Nvidia so I didn’t bother with that, it has no issues with my amdgpu, though I have yet to get all my config setup yet.

1 Like

OK, thanks. I’ve checked the Nix build file and it seems like Nvidia support should be built, but it’s not.