overrides: add override for panel, imagecodecs

Note that imagecodecs override depends on https://github.com/NixOS/nixpkgs/pull/87205
This commit is contained in:
tbenst 2020-05-07 10:54:04 -07:00 committed by adisbladis
parent bb06c87e89
commit 49822d2ccf
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -163,6 +163,64 @@ self: super:
}
);
imagecodecs = super.imagecodecs.overridePythonAttrs
(
old: {
patchPhase = ''
substituteInPlace setup.py \
--replace "/usr/include/openjpeg-2.3" \
"${pkgs.openjpeg.dev}/include/openjpeg-2.3"
substituteInPlace setup.py \
--replace "/usr/include/jxrlib" \
"$out/include/libjxr"
substituteInPlace imagecodecs/_zopfli.c \
--replace '"zopfli/zopfli.h"' \
'<zopfli.h>'
substituteInPlace imagecodecs/_zopfli.c \
--replace '"zopfli/zlib_container.h"' \
'<zlib_container.h>'
substituteInPlace imagecodecs/_zopfli.c \
--replace '"zopfli/gzip_container.h"' \
'<gzip_container.h>'
'';
preBuild = ''
mkdir -p $out/include/libjxr
ln -s ${pkgs.jxrlib}/include/libjxr/**/* $out/include/libjxr
'';
buildInputs = old.buildInputs ++ [
# Commented out packages are declared required, but not actually
# needed to build. They are not yet packaged for nixpkgs.
# bitshuffle
pkgs.brotli
# brunsli
pkgs.bzip2
pkgs.c-blosc
# charls
pkgs.giflib
pkgs.jxrlib
pkgs.lcms
pkgs.libaec
pkgs.libaec
pkgs.libjpeg_turbo
# liblzf
# liblzma
pkgs.libpng
pkgs.libtiff
pkgs.libwebp
pkgs.lz4
pkgs.openjpeg
pkgs.snappy
# zfp
pkgs.zopfli
pkgs.zstd
pkgs.zlib
];
}
);
# importlib-metadata has an incomplete dependency specification
importlib-metadata = super.importlib-metadata.overridePythonAttrs
(
@ -694,6 +752,13 @@ self: super:
}
);
panel = super.panel.overridePythonAttrs
(
old: {
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.nodejs ];
}
);
# Pybind11 is an undeclared dependency of scipy that we need to pick from nixpkgs
# Make it not fail with infinite recursion
pybind11 = super.pybind11.overridePythonAttrs