Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chafa: support avif, jxl and svg image formats; add zsh completion; split outputs #369630

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions pkgs/tools/misc/chafa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
autoconf,
automake,
libtool,
pkg-config,
which,
libavif,
libjxl,
librsvg,
libxslt,
libxml2,
docbook_xml_dtd_412,
docbook_xsl,
glib,
imagemagick,
Foundation,
}:

Expand All @@ -27,22 +30,30 @@ stdenv.mkDerivation rec {
sha256 = "sha256-9RkN0yZnHf5cx6tsp3P6jsi0/xtplWxMm3hYCPjWj0M=";
};

outputs = [
"bin"
"dev"
"man"
"out"
];

nativeBuildInputs = [
autoconf
automake
libtool
pkg-config
which
libavif
libjxl
librsvg
libxslt
libxml2
docbook_xml_dtd_412
docbook_xsl
installShellFiles
];

buildInputs = [
glib
imagemagick
] ++ lib.optional stdenv.hostPlatform.isDarwin Foundation;
buildInputs = [ glib ] ++ lib.optional stdenv.hostPlatform.isDarwin Foundation;

patches = [ ./xmlcatalog_patch.patch ];

Expand All @@ -56,8 +67,9 @@ stdenv.mkDerivation rec {
"--with-xml-catalog=${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"
];

# https://github.com/NixOS/nixpkgs/pull/240893#issuecomment-1635347507
NIX_LDFLAGS = [ "-lwebp" ];
postInstall = ''
installShellCompletion --cmd chafa tools/completions/zsh-completion.zsh
'';

meta = with lib; {
description = "Terminal graphics for the 21st century";
Expand Down
Loading