2024-09-01 16:24:50 +02:00
|
|
|
{ self, nixpkgs, ... }: final: prev:
|
2024-08-22 18:21:40 +02:00
|
|
|
|
|
|
|
let
|
2024-09-01 16:24:50 +02:00
|
|
|
inherit (final) system;
|
2024-09-06 17:26:51 +02:00
|
|
|
inherit (nixpkgs.lib.attrsets) genAttrs mapAttrsToList;
|
2024-10-23 19:43:49 +02:00
|
|
|
inherit (nixpkgs.lib.lists) remove subtractLists toList;
|
2024-09-01 16:24:50 +02:00
|
|
|
inherit (nixpkgs.lib.strings) mesonBool mesonEnable;
|
|
|
|
inherit (self.lib) substituteFlags removePackages;
|
2024-08-24 16:22:30 +02:00
|
|
|
|
|
|
|
final' = final;
|
|
|
|
prev' = prev;
|
2024-09-01 16:24:50 +02:00
|
|
|
|
|
|
|
in genAttrs [
|
|
|
|
"cairo"
|
|
|
|
"dbus"
|
|
|
|
"ghostscript"
|
|
|
|
"gobject-introspection"
|
|
|
|
"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; })
|
|
|
|
|
|
|
|
// {
|
|
|
|
xvfb-run = self.packages.${system}.wayland-headless;
|
|
|
|
|
|
|
|
beam = prev.beam_nox;
|
|
|
|
graphviz = prev.graphviz-nox;
|
|
|
|
jdk8 = prev.jdk8_headless;
|
|
|
|
jre8 = prev.jre8_headless;
|
|
|
|
openjdk8 = prev.openjdk_headless;
|
|
|
|
|
|
|
|
SDL2 = prev.SDL2.override {
|
|
|
|
alsaSupport = false;
|
|
|
|
x11Support = false;
|
|
|
|
};
|
|
|
|
|
2024-08-18 13:47:18 +02:00
|
|
|
curl = prev.curl.override {
|
|
|
|
gssSupport = false;
|
|
|
|
scpSupport = false;
|
|
|
|
zstdSupport = true;
|
|
|
|
};
|
|
|
|
|
2024-09-01 18:33:12 +02:00
|
|
|
electron = prev.electron.override {
|
|
|
|
electron-unwrapped = prev.electron.unwrapped.overrideAttrs (prevAttrs: {
|
|
|
|
gnFlags = prevAttrs.gnFlags or "" + ''
|
|
|
|
# Disable X11
|
|
|
|
ozone_platform_x11 = false
|
|
|
|
|
|
|
|
# Disable internal memory allocator
|
|
|
|
use_partition_alloc_as_malloc = false
|
|
|
|
enable_backup_ref_ptr_support = false
|
|
|
|
enable_pointer_compression_support = false
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-09-01 16:49:35 +02:00
|
|
|
evolution = prev.evolution.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libcanberra" ];
|
|
|
|
|
|
|
|
cmakeFlags = prevAttrs.cmakeFlags or [ ]
|
|
|
|
++ [ "-DENABLE_CANBERRA:BOOL=OFF" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
evolution-data-server = prev.evolution-data-server.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libcanberra" ];
|
|
|
|
|
|
|
|
cmakeFlags = prevAttrs.cmakeFlags or [ ]
|
|
|
|
|> substituteFlags { "-DENABLE_CANBERRA[:=].*" = "-DENABLE_CANBERRA:BOOL=OFF"; };
|
|
|
|
});
|
|
|
|
|
2024-08-18 13:47:18 +02:00
|
|
|
ffmpeg = prev.ffmpeg.override {
|
|
|
|
ffmpegVariant = "headless";
|
|
|
|
withAlsa = false;
|
|
|
|
withSsh = false;
|
|
|
|
};
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
firefox-unwrapped = (prev.firefox-unwrapped.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
++ [ final.alsa-lib ];
|
|
|
|
|
|
|
|
configureFlags = prevAttrs.configureFlags or [ ]
|
|
|
|
|> substituteFlags {
|
|
|
|
"--enable-default-toolkit=.*" = "--enable-default-toolkit=cairo-gtk3-wayland-only";
|
|
|
|
};
|
|
|
|
})).override {
|
2024-08-18 13:47:18 +02:00
|
|
|
alsaSupport = false;
|
|
|
|
gssSupport = false;
|
|
|
|
jemallocSupport = false;
|
|
|
|
sndioSupport = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
firefox = final.wrapFirefox final.firefox-unwrapped { };
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
gammastep = prev.gammastep.override {
|
|
|
|
withRandr = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
gd = prev.gd.override { withXorg = false; };
|
|
|
|
|
|
|
|
gst_all_1 = prev.gst_all_1 // (genAttrs [
|
|
|
|
"gst-plugins-base"
|
|
|
|
"gst-plugins-good"
|
|
|
|
] (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-22 16:53:58 +02:00
|
|
|
gst-plugins-bad = prev.gst_all_1.gst-plugins-bad.overrideAttrs (prevAttrs: {
|
|
|
|
mesonFlags = prevAttrs.mesonFlags or [ ]
|
|
|
|
++ [ "-Dcurl-ssh2=disabled" ];
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-09-05 20:53:23 +02:00
|
|
|
gtk3 = (prev.gtk3.overrideAttrs (prevAttrs: {
|
|
|
|
propagatedBuildInputs = prevAttrs.propagatedBuildInputs or [ ]
|
|
|
|
|> removePackages [ "libICE" "libSM" "libX.*" ];
|
|
|
|
})).override {
|
|
|
|
x11Support = false;
|
|
|
|
xineramaSupport = false;
|
|
|
|
};
|
|
|
|
|
2024-09-05 21:03:44 +02:00
|
|
|
gtk4 = (prev.gtk4.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libICE" "libSM" "libX.*" ];
|
|
|
|
})).override {
|
|
|
|
x11Support = false;
|
|
|
|
xineramaSupport = false;
|
|
|
|
};
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
imagemagick = prev.imagemagick.override {
|
|
|
|
libX11Support = false;
|
|
|
|
libXtSupport = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
imv = (prev.imv.overrideAttrs(prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
++ [ final.libGL ];
|
|
|
|
})).override {
|
|
|
|
withWindowSystem = "wayland";
|
|
|
|
};
|
|
|
|
|
|
|
|
inkscape = prev.inkscape.overrideAttrs (prevAttrs: {
|
|
|
|
cmakeFlags = prevAttrs.cmakeFlags or [ ]
|
|
|
|
++ [ "-DWITH_X11:BOOL=OFF" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
keepassxc = (prev.keepassxc.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs
|
|
|
|
|> removePackages [ "kio" ];
|
|
|
|
})).override {
|
|
|
|
withKeePassX11 = false;
|
|
|
|
};
|
|
|
|
|
2024-09-05 22:11:31 +02:00
|
|
|
kitty = prev.kitty.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libX.*" ];
|
|
|
|
|
|
|
|
postPatch = prevAttrs.postPatch or "" + ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "'x11 wayland'" "'wayland'" \
|
|
|
|
--replace-fail "'gl'" "'opengl'"
|
|
|
|
|
|
|
|
substituteInPlace kitty_tests/{check_build,glfw}.py \
|
|
|
|
--replace-fail "'x11'" "'wayland'"
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
libcanberra = prev.libcanberra.override {
|
|
|
|
withAlsa = false;
|
|
|
|
gtkSupport = null;
|
|
|
|
};
|
|
|
|
|
2024-09-06 00:07:56 +02:00
|
|
|
libcanberra-gtk3 = final.libcanberra.overrideAttrs (prevAttrs: {
|
|
|
|
passthru = prevAttrs.passthru or { } // {
|
|
|
|
gtkModule = final.emptyDirectory;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
libepoxy = (prev.libepoxy.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
++ [ final.libGL ];
|
|
|
|
mesonFlags = prevAttrs.mesonFlags or [ ]
|
|
|
|
|> substituteFlags { "-Degl=.*" = "-Degl=yes"; };
|
|
|
|
})).override {
|
|
|
|
x11Support = false;
|
|
|
|
};
|
|
|
|
|
2024-09-05 22:54:43 +02:00
|
|
|
libva = prev.libva.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libX.*" ];
|
|
|
|
|
|
|
|
meta = prevAttrs.meta or { } // {
|
|
|
|
pkgConfigModules = prevAttrs.meta.pkgConfigModules
|
|
|
|
|> subtractLists [ "libva-glx" "libva-x11" ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-09-05 21:06:32 +02:00
|
|
|
libGL = prev.libGL.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libX.*" "xorgproto" ];
|
|
|
|
|
|
|
|
configureFlags = prevAttrs.configureFlags or [ ]
|
|
|
|
++ [ "--disable-x11" ];
|
|
|
|
|
|
|
|
postFixup = null;
|
|
|
|
});
|
|
|
|
|
2024-09-01 16:24:50 +02:00
|
|
|
libgnomekbd = prev.libgnomekbd.overrideAttrs (prevAttrs: {
|
|
|
|
mesonFlags = prevAttrs.mesonFlags or [ ]
|
|
|
|
++ [ (mesonBool "tests" false) ];
|
|
|
|
});
|
|
|
|
|
2024-08-24 16:22:30 +02:00
|
|
|
libsForQt5 = prev.libsForQt5.overrideScope (final: prev: {
|
|
|
|
inherit (final') qt5;
|
2024-09-01 16:24:50 +02:00
|
|
|
|
|
|
|
kguiaddons = prev.kguiaddons.overrideAttrs (prevAttrs: {
|
|
|
|
cmakeFlags = prevAttrs.cmakeFlags or [ ]
|
|
|
|
++ [ "-DWITH_X11:BOOL=OFF" ];
|
|
|
|
});
|
2024-08-24 16:22:30 +02:00
|
|
|
});
|
|
|
|
|
2024-09-05 21:16:06 +02:00
|
|
|
libxkbcommon = prev.libxkbcommon.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libxcb" ];
|
|
|
|
|
|
|
|
mesonFlags = prevAttrs.mesonFlags or [ ]
|
|
|
|
++ [ (mesonBool "enable-x11" false ) ];
|
|
|
|
|
|
|
|
meta = prevAttrs.meta or { } // {
|
|
|
|
pkgConfigModules = prevAttrs.meta.pkgConfigModules or [ ]
|
|
|
|
|> remove "xkbcommon-x11";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-08-22 18:21:40 +02:00
|
|
|
mesa = (prev.mesa.overrideAttrs (prevAttrs: {
|
|
|
|
outputs = remove "spirv2dxil" prevAttrs.outputs;
|
2024-09-01 16:24:50 +02:00
|
|
|
|
|
|
|
mesonFlags = prevAttrs.mesonFlags or [ ] ++ [
|
|
|
|
(mesonEnable "xlib-lease" false)
|
|
|
|
(mesonEnable "glx" false)
|
|
|
|
(mesonEnable "gallium-vdpau" false)
|
|
|
|
];
|
2024-08-22 18:21:40 +02:00
|
|
|
})).override {
|
2024-08-18 13:47:18 +02:00
|
|
|
galliumDrivers = [
|
|
|
|
"iris"
|
|
|
|
"nouveau"
|
|
|
|
"radeonsi"
|
|
|
|
"swrast"
|
|
|
|
"zink"
|
|
|
|
];
|
|
|
|
|
|
|
|
vulkanDrivers = [
|
|
|
|
"amd"
|
|
|
|
"intel"
|
|
|
|
"nouveau"
|
|
|
|
"swrast"
|
|
|
|
];
|
|
|
|
|
|
|
|
eglPlatforms = [ "wayland" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
mpv-unwrapped = prev.mpv-unwrapped.override {
|
|
|
|
alsaSupport = false;
|
|
|
|
cacaSupport = false;
|
|
|
|
openalSupport = false;
|
|
|
|
sdl2Support = false;
|
|
|
|
vdpauSupport = false;
|
|
|
|
x11Support = false;
|
|
|
|
xineramaSupport = false;
|
|
|
|
xvSupport = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
mpv = final.mpv-unwrapped.wrapper {
|
|
|
|
mpv = final.mpv-unwrapped;
|
|
|
|
};
|
|
|
|
|
2024-08-24 16:22:30 +02:00
|
|
|
qt5 = prev.qt5.overrideScope (final: prev: {
|
2024-09-01 16:24:50 +02:00
|
|
|
qtbase = (prev.qtbase.overrideAttrs (prevAttrs: {
|
|
|
|
env = prevAttrs.env or { } // {
|
|
|
|
NIX_CFLAGS_COMPILE = prevAttrs.env.NIX_CFLAGS_COMPILE or ""
|
|
|
|
|> substituteFlags { "-DUSE_X11" = null; };
|
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = prevAttrs.configureFlags or [ ]
|
|
|
|
|> substituteFlags {
|
2024-09-06 13:09:35 +02:00
|
|
|
"-opengl .*" = "-opengl es2";
|
2024-09-01 16:24:50 +02:00
|
|
|
"-qpa .*" = null;
|
|
|
|
"-xcb" = "-no-xcb";
|
|
|
|
};
|
|
|
|
})).override {
|
2024-08-24 16:22:30 +02:00
|
|
|
mysqlSupport = false;
|
2024-09-01 16:24:50 +02:00
|
|
|
withGtk3 = false;
|
|
|
|
withQttranslation = false;
|
2024-08-24 16:22:30 +02:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2024-11-01 17:46:25 +01:00
|
|
|
qt6 = final.lib.makeOverridable ({ ... }@args: (prev.qt6.override args).overrideScope (final: prev: {
|
2024-09-06 17:26:51 +02:00
|
|
|
qtbase = (prev.qtbase.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "libX.*" "libxcb" "xcb.*" ];
|
|
|
|
|
|
|
|
cmakeFlags = prevAttrs.cmakeFlags ++ mapAttrsToList
|
|
|
|
(f: v: "-DQT_FEATURE_${f}:BOOL=${if v then "ON" else "OFF"}") {
|
|
|
|
xcb = false;
|
|
|
|
xlib = false;
|
|
|
|
vulkan = true;
|
|
|
|
wayland = true;
|
|
|
|
};
|
|
|
|
})).override {
|
|
|
|
postgresql = null;
|
|
|
|
qttranslations = null;
|
|
|
|
};
|
2024-10-23 19:43:49 +02:00
|
|
|
|
|
|
|
qtwebengine = prev.qtwebengine.overrideAttrs (prevAttrs: {
|
|
|
|
env = prevAttrs.env or { } // {
|
|
|
|
# hacky
|
|
|
|
NIX_CFLAGS_COMPILE = toList prevAttrs.env.NIX_CFLAGS_COMPILE or [ ] ++
|
|
|
|
[ "-DGL_RGBA8_OES=0x8058" ] |> toString;
|
|
|
|
};
|
|
|
|
});
|
2024-11-01 17:46:25 +01:00
|
|
|
})) { };
|
2024-09-06 17:26:51 +02:00
|
|
|
|
2024-08-18 13:47:18 +02:00
|
|
|
systemd = prev.systemd.override {
|
|
|
|
withApparmor = false;
|
|
|
|
withHomed = false;
|
|
|
|
withIptables = false;
|
|
|
|
};
|
2024-09-01 16:24:50 +02:00
|
|
|
|
2024-09-05 18:37:13 +02:00
|
|
|
thunderbird-unwrapped = (prev.thunderbird-unwrapped.overrideAttrs (prevAttrs: {
|
2024-09-01 16:24:50 +02:00
|
|
|
configureFlags = prevAttrs.configureFlags or [ ]
|
|
|
|
|> substituteFlags {
|
|
|
|
"--enable-default-toolkit=.*" = "--enable-default-toolkit=cairo-gtk3-wayland-only";
|
|
|
|
};
|
2024-09-05 18:37:13 +02:00
|
|
|
})).override {
|
|
|
|
jemallocSupport = false;
|
|
|
|
};
|
2024-09-01 16:24:50 +02:00
|
|
|
|
|
|
|
thunderbird = final.wrapThunderbird final.thunderbird-unwrapped { };
|
|
|
|
|
|
|
|
w3m = prev.w3m.override {
|
|
|
|
x11Support = false;
|
|
|
|
imlib2 = final.imlib2;
|
|
|
|
};
|
|
|
|
|
|
|
|
utsushi = prev.utsushi.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "gtkmm" ];
|
|
|
|
configureFlags = prevAttrs.configureFlags or [ ]
|
|
|
|
|> substituteFlags { "--with-gtkmm" = null; };
|
|
|
|
});
|
|
|
|
|
|
|
|
vim-full = prev.vim-full.override {
|
|
|
|
guiSupport = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
wayland = prev.wayland.override {
|
|
|
|
# broken
|
|
|
|
withDocumentation = false;
|
|
|
|
};
|
2024-10-08 12:17:22 +02:00
|
|
|
|
|
|
|
xdg-desktop-portal-gtk = prev.xdg-desktop-portal-gtk.overrideAttrs (prevAttrs: {
|
|
|
|
buildInputs = prevAttrs.buildInputs or [ ]
|
|
|
|
|> removePackages [ "gnome-settings-daemon" ];
|
|
|
|
});
|
2024-08-18 13:47:18 +02:00
|
|
|
}
|