Merge pull request #286341 from Izorkin/update-fastfetch

This commit is contained in:
Sandro 2024-02-05 17:08:45 +01:00 committed by GitHub
commit 1b06c0f273
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 14 deletions

View file

@ -30,6 +30,7 @@ with lib;
beam = super.beam_nox;
cairo = super.cairo.override { x11Support = false; };
dbus = super.dbus.override { x11Support = false; };
fastfetch = super.fastfetch.override { vulkanSupport = false; waylandSupport = false; x11Support = false; };
ffmpeg_4 = super.ffmpeg_4.override { ffmpegVariant = "headless"; };
ffmpeg_5 = super.ffmpeg_5.override { ffmpegVariant = "headless"; };
# dep of graphviz, libXpm is optional for Xpm support

View file

@ -9,25 +9,36 @@
, ddcutil
, glib
, imagemagick_light
, libXrandr
, libglvnd
, libpulseaudio
, libselinux
, libsepol
, libxcb
, libXrandr
, makeBinaryWrapper
, networkmanager
, nix-update-script
, ocl-icd
, opencl-headers
, pciutils
, pcre
, pcre2
, pkg-config
, python3
, rpm
, sqlite
, testers
, util-linux
, vulkan-loader
, wayland
, xfce
, xorg
, yyjson
, zlib
, rpmSupport ? false
, vulkanSupport ? true
, waylandSupport ? true
, x11Support ? true
}:
stdenv.mkDerivation (finalAttrs: {
@ -41,38 +52,52 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-s0N3Rt3lLOCyaeXeNYu6hlGtNtGR+YC7Aj4/3SeVMpQ=";
};
outputs = [ "out" "man" ];
nativeBuildInputs = [
cmake
makeBinaryWrapper
pkg-config
python3
];
buildInputs = [
chafa
imagemagick_light
pcre
pcre2
sqlite
yyjson
]
++ lib.optionals stdenv.isLinux [
] ++ lib.optionals stdenv.isLinux [
dbus
dconf
ddcutil
glib
libglvnd
libpulseaudio
libxcb
libXrandr
libselinux
libsepol
networkmanager
ocl-icd
opencl-headers
pciutils
rpm
vulkan-loader
wayland
xfce.xfconf
util-linux
zlib
]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
] ++ lib.optionals rpmSupport [
rpm
] ++ lib.optionals vulkanSupport [
vulkan-loader
] ++ lib.optionals waylandSupport [
wayland
] ++ lib.optionals x11Support [
libXrandr
libglvnd
libxcb
xorg.libXau
xorg.libXdmcp
xorg.libXext
] ++ lib.optionals (x11Support && (!stdenv.isDarwin)) [
xfce.xfconf
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
Apple80211
AppKit
Cocoa
@ -88,8 +113,21 @@ stdenv.mkDerivation (finalAttrs: {
]);
cmakeFlags = [
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
"-DENABLE_SYSTEM_YYJSON=YES"
(lib.cmakeOptionType "filepath" "CMAKE_INSTALL_SYSCONFDIR" "${placeholder "out"}/etc")
(lib.cmakeBool "ENABLE_DIRECTX_HEADERS" false)
(lib.cmakeBool "ENABLE_DRM" false)
(lib.cmakeBool "ENABLE_IMAGEMAGICK6" false)
(lib.cmakeBool "ENABLE_OSMESA" false)
(lib.cmakeBool "ENABLE_SYSTEM_YYJSON" true)
(lib.cmakeBool "ENABLE_GLX" x11Support)
(lib.cmakeBool "ENABLE_RPM" rpmSupport)
(lib.cmakeBool "ENABLE_VULKAN" x11Support)
(lib.cmakeBool "ENABLE_WAYLAND" waylandSupport)
(lib.cmakeBool "ENABLE_X11" x11Support)
(lib.cmakeBool "ENABLE_XCB" x11Support)
(lib.cmakeBool "ENABLE_XCB_RANDR" x11Support)
(lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.isDarwin)))
(lib.cmakeBool "ENABLE_XRANDR" x11Support)
];
env.NIX_CFLAGS_COMPILE = toString [