idiosyn/overlay/no-x.nix

123 lines
2.8 KiB
Nix
Raw Normal View History

2024-08-18 13:47:18 +02:00
{ nixpkgs, ... }: final: prev:
let
inherit (nixpkgs.lib.attrsets) genAttrs;
inherit (nixpkgs.lib.lists) remove toList;
inherit (nixpkgs.lib.strings) mesonBool mesonEnable;
in genAttrs [
"SDL2"
"cairo"
"dbus"
"ghostscript"
"gobject-introspection"
"gtk3"
"gtk4"
"imlib2"
"libcaca"
"pango"
"pipewire"
] (pkg: prev.${pkg}.override { x11Support = false; })
// genAttrs [
"intel-media-driver"
"mupdf"
] (pkg: prev.${pkg}.override { enableX11 = false; })
// genAttrs [
"hyprland"
"sway"
"sway-unwrapped"
"swayfx"
"swayfx-unwrapped"
"wlroots"
] (pkg: prev.${pkg}.override { enableXWayland = false; })
// {
beam = prev.beam_nox;
graphviz = prev.graphviz-nox;
gammastep = prev.gammastep.override {
withRandr = false;
};
gd = prev.gd.override { withXorg = false; };
gjs = prev.gjs.override { installTests = false; };
2024-08-18 13:47:18 +02:00
gst_all_1 = prev.gst_all_1 // genAttrs [
"gst-plugins-base"
"gst-plugins-good"
2024-08-22 18:51:34 +02:00
] (pkg: prev.gst_all_1.${pkg}.override { enableX11 = false; }) // {
gst-vaapi = prev.gst_all_1.gst-vaapi.overrideAttrs (prevAttrs: {
mesonFlags = prevAttrs.mesonFlags or [ ] ++ [
(mesonEnable "x11" false)
(mesonEnable "glx" false)
];
});
};
2024-08-18 13:47:18 +02:00
imagemagick = prev.imagemagick.override {
libX11Support = false;
libXtSupport = false;
};
2024-08-21 22:35:05 +02:00
imv = (prev.imv.overrideAttrs(prevAttrs: {
buildInputs = prevAttrs.buildInputs or [ ]
++ [ final.libGL ];
})).override {
withWindowSystem = "wayland";
};
2024-08-18 13:47:18 +02:00
libepoxy = (prev.libepoxy.overrideAttrs (prevAttrs: {
buildInputs = prevAttrs.buildInputs or [ ]
++ [ final.libGL ];
mesonFlags = prevAttrs.mesonFlags or [ ]
|> map (flag: if flag == "-Degl=no" then "-Degl=yes" else flag);
})).override {
x11Support = false;
};
libgnomekbd = prev.libgnomekbd.overrideAttrs (prevAttrs: {
mesonFlags = prevAttrs.mesonFlags or [ ]
++ [ (mesonBool "tests" false) ];
});
mesa = (prev.mesa.overrideAttrs (prevAttrs: {
mesonFlags = prevAttrs.mesonFlags or [ ] ++ [
(mesonEnable "xlib-lease" false)
(mesonEnable "glx" false)
(mesonEnable "gallium-vdpau" false)
];
})).override {
eglPlatforms = [ "wayland" ];
};
mpv-unwrapped = prev.mpv-unwrapped.override {
x11Support = false;
xineramaSupport = false;
xvSupport = false;
};
mpv = final.mpv-unwrapped.wrapper {
mpv = final.mpv-unwrapped;
};
w3m = prev.w3m.override {
x11Support = false;
imlib2 = final.imlib2;
};
utsushi = prev.utsushi.overrideAttrs (prevAttrs: {
buildInputs = remove prev.gtkmm2.dev prevAttrs.buildInputs;
configureFlags = remove "--with-gtkmm" prevAttrs.configureFlags;
2024-08-18 13:47:18 +02:00
});
2024-08-21 22:35:39 +02:00
vim-full = prev.vim-full.override {
guiSupport = false;
};
2024-08-18 13:47:18 +02:00
wayland = prev.wayland.override {
# broken
withDocumentation = false;
};
}