neofetch: add option for optional dependency

This commit is contained in:
Bruno Bigras 2021-06-25 15:56:39 -04:00
parent 3affea2a73
commit 16dc11399d

View file

@ -1,4 +1,6 @@
{ lib, stdenvNoCC, fetchFromGitHub, bash, makeWrapper, pciutils, ueberzug }:
{ lib, stdenvNoCC, fetchFromGitHub, bash, makeWrapper, pciutils
, x11Support ? true, ueberzug
}:
stdenvNoCC.mkDerivation rec {
pname = "neofetch";
@ -20,7 +22,7 @@ stdenvNoCC.mkDerivation rec {
postInstall = ''
wrapProgram $out/bin/neofetch \
--prefix PATH : ${lib.makeBinPath [ pciutils ueberzug ]}
--prefix PATH : ${lib.makeBinPath ([ pciutils ] ++ lib.optional x11Support ueberzug) }
'';
makeFlags = [