I would like to propose a fix to the fcitx package but to do that, I need to check if a package is installed. Sthg like: fcitx = super.fcitx.overrideAttrs (oldAttrs: { cmakeFlags = super.stdenv.lib.optionalString "${super.xkeyboard_config.isInstalled}" builtins.concatStrings oldAttrs.cmakeFlags "${super.xkeyboard_config}"; }); except xkeyboard_config.isInstalled doesn't exist. I've explored with nix-repl the attributes of xkeyboard_config to no avail :'(