nixpkgs/pkgs/development/libraries/vigra/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
1.7 KiB
Nix
Raw Normal View History

2024-08-21 22:22:13 +08:00
{
lib,
stdenv,
fetchFromGitHub,
boost,
cmake,
fftw,
fftwSinglePrec,
hdf5,
libjpeg,
libpng,
libtiff,
openexr,
python3,
2021-11-01 15:58:00 +01:00
}:
2015-06-25 22:56:09 +02:00
2016-10-18 17:07:46 +02:00
let
2022-01-12 04:40:07 +01:00
python = python3.withPackages (py: with py; [ numpy ]);
2021-11-01 15:58:00 +01:00
in
2025-01-23 20:08:53 +08:00
stdenv.mkDerivation (finalAttrs: {
pname = "vigra";
2025-01-21 23:54:15 +01:00
version = "1.12.1";
2021-11-01 15:58:00 +01:00
src = fetchFromGitHub {
owner = "ukoethe";
repo = "vigra";
2025-01-23 20:08:53 +08:00
tag = "Version-${lib.replaceStrings [ "." ] [ "-" ] finalAttrs.version}";
2025-01-21 23:54:15 +01:00
hash = "sha256-ZmHj1BSyoMBCuxI5hrRiBEb5pDUsGzis+T5FSX27UN8=";
};
2025-02-21 20:25:50 -05:00
patches = [
2025-06-02 15:54:57 +02:00
# Patches to fix compiling on LLVM 19 from https://github.com/ukoethe/vigra/pull/592
2025-02-21 20:25:50 -05:00
./fix-llvm-19-1.patch
./fix-llvm-19-2.patch
];
nativeBuildInputs = [ cmake ];
2021-11-01 15:58:00 +01:00
buildInputs = [
boost
fftw
fftwSinglePrec
hdf5
libjpeg
libpng
libtiff
openexr
python
];
postPatch = ''
chmod +x config/run_test.sh.in
patchShebangs --build config/run_test.sh.in
'';
2024-08-21 22:22:13 +08:00
cmakeFlags =
[
"-DWITH_OPENEXR=1"
"-DVIGRANUMPY_INSTALL_DIR=${placeholder "out"}/${python.sitePackages}"
]
2024-08-21 22:22:13 +08:00
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
"-DCMAKE_CXX_FLAGS=-fPIC"
"-DCMAKE_C_FLAGS=-fPIC"
];
2015-06-25 22:56:09 +02:00
2025-01-23 02:34:13 +08:00
enableParallelBuilding = true;
passthru = {
tests = {
check = finalAttrs.finalPackage.overrideAttrs (previousAttrs: {
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
});
};
};
meta = with lib; {
description = "Novel computer vision C++ library with customizable algorithms and data structures";
mainProgram = "vigra-config";
homepage = "https://hci.iwr.uni-heidelberg.de/vigra";
2015-06-25 22:56:09 +02:00
license = licenses.mit;
2025-01-23 20:17:52 +08:00
maintainers = with maintainers; [ ShamrockLee ];
2018-04-17 20:39:10 +01:00
platforms = platforms.unix;
};
2025-01-23 20:08:53 +08:00
})