11 # Enable linking against image loading libraries as part of the
12 # implementation of the sixel_helper_{load,write}_image_file() functions.
13 # These helper functions are not needed for the main functionality of the
14 # library to encode image buffers to sixels.
16 # libsixel already uses vendored stb image loading to provide basic
17 # implementations, but also allows for the "gd" library to be linked for
18 # a wider set of image formats.
19 # This pulls in a large amount of deps bloating the resulting library.
21 # Default off, but configurable in case you really need it.
25 stdenv.mkDerivation (finalAttrs: {
29 src = fetchFromGitHub {
32 rev = "v${finalAttrs.version}";
33 hash = "sha256-obzBZAknN3N7+Bvtd0+JHuXcemVb7wRv+Pt4VjS6Bck=";
36 buildInputs = lib.optionals withGd [
54 (lib.mesonEnable "gd" withGd)
56 # build system seems to be broken here; error message indicates pkconfig
58 # Not to worry: jpeg and png are handled by the built-in stb and/or gd lib.
64 description = "SIXEL library for console graphics, and converter programs";
65 homepage = "https://github.com/libsixel/libsixel";
66 maintainers = with lib.maintainers; [ hzeller ];
67 license = licenses.mit;
68 platforms = platforms.unix;