depot/third_party/nixpkgs/pkgs/kde/plasma/kde-gtk-config/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

44 lines
1 KiB
Nix

{
lib,
mkKdeDerivation,
substituteAll,
procps,
xsettingsd,
pkg-config,
wrapGAppsHook3,
sass,
qtsvg,
gsettings-desktop-schemas,
}:
mkKdeDerivation {
pname = "kde-gtk-config";
# The gtkconfig KDED module will crash the daemon if the GSettings schemas
# aren't found.
patches = [
./0001-gsettings-schemas-path.patch
(
substituteAll {
src = ./dependency-paths.patch;
pgrep = lib.getExe' procps "pgrep";
xsettingsd = lib.getExe xsettingsd;
}
)
];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\""
'';
extraNativeBuildInputs = [pkg-config wrapGAppsHook3 sass];
extraBuildInputs = [qtsvg];
dontWrapGApps = true; # There is nothing to wrap
extraCmakeFlags = ["-DGLIB_SCHEMAS_DIR=${gsettings-desktop-schemas.out}/"];
# Hardcoded as QStrings, which are UTF-16 so Nix can't pick these up automatically
postFixup = ''
mkdir -p $out/nix-support
echo "${procps} ${xsettingsd}" > $out/nix-support/depends
'';
}