42 waylandSupport ? true,
44 flashfetchSupport ? false,
46 stdenv.mkDerivation (finalAttrs: {
50 src = fetchFromGitHub {
51 owner = "fastfetch-cli";
53 tag = finalAttrs.version;
54 hash = "sha256-ChuK5DHRj1qJIjRo3oB5gdCxox2mDffCVM0wRGc5t1o=";
78 ++ lib.optionals stdenv.hostPlatform.isLinux [
93 ++ lib.optionals rpmSupport [ rpm ]
94 ++ lib.optionals vulkanSupport [ vulkan-loader ]
95 ++ lib.optionals waylandSupport [ wayland ]
96 ++ lib.optionals x11Support [
104 ++ lib.optionals (x11Support && (!stdenv.hostPlatform.isDarwin)) [ xfce.xfconf ]
105 ++ lib.optionals stdenv.hostPlatform.isDarwin [
112 (lib.cmakeOptionType "filepath" "CMAKE_INSTALL_SYSCONFDIR" "${placeholder "out"}/etc")
113 (lib.cmakeBool "ENABLE_DIRECTX_HEADERS" false)
114 (lib.cmakeBool "ENABLE_DRM" false)
115 (lib.cmakeBool "ENABLE_IMAGEMAGICK6" false)
116 (lib.cmakeBool "ENABLE_OSMESA" false)
117 (lib.cmakeBool "ENABLE_SYSTEM_YYJSON" true)
118 (lib.cmakeBool "ENABLE_GLX" x11Support)
119 (lib.cmakeBool "ENABLE_RPM" rpmSupport)
120 (lib.cmakeBool "ENABLE_VULKAN" x11Support)
121 (lib.cmakeBool "ENABLE_WAYLAND" waylandSupport)
122 (lib.cmakeBool "ENABLE_X11" x11Support)
123 (lib.cmakeBool "ENABLE_XCB" x11Support)
124 (lib.cmakeBool "ENABLE_XCB_RANDR" x11Support)
125 (lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.hostPlatform.isDarwin)))
126 (lib.cmakeBool "ENABLE_XRANDR" x11Support)
127 (lib.cmakeBool "BUILD_FLASHFETCH" flashfetchSupport)
129 ++ lib.optionals stdenv.hostPlatform.isLinux [
130 (lib.cmakeOptionType "filepath" "CUSTOM_PCI_IDS_PATH" "${hwdata}/share/hwdata/pci.ids")
131 (lib.cmakeOptionType "filepath" "CUSTOM_AMDGPU_IDS_PATH" "${libdrm}/share/libdrm/amdgpu.ids")
135 substituteInPlace completions/fastfetch.fish --replace-fail python3 '${python3.interpreter}'
140 wrapProgram $out/bin/fastfetch \
141 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}"
143 + lib.optionalString flashfetchSupport ''
144 wrapProgram $out/bin/flashfetch \
145 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}"
148 nativeInstallCheckInputs = [ versionCheckHook ];
149 versionCheckProgramArg = "--version";
150 doInstallCheck = true;
152 passthru.updateScript = nix-update-script { };
155 description = "An actively maintained, feature-rich and performance oriented, neofetch like system information tool";
156 homepage = "https://github.com/fastfetch-cli/fastfetch";
157 changelog = "https://github.com/fastfetch-cli/fastfetch/releases/tag/${finalAttrs.version}";
158 license = lib.licenses.mit;
159 maintainers = with lib.maintainers; [
160 luftmensch-luftmensch
163 platforms = lib.platforms.all;
164 mainProgram = "fastfetch";