2023-06-09 20:17:44 +00:00
|
|
|
{ stdenv
|
|
|
|
, llvmPackages
|
2020-10-11 03:09:01 +00:00
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2023-06-21 08:57:57 +00:00
|
|
|
, libffi
|
2020-10-11 03:09:01 +00:00
|
|
|
, libpng
|
|
|
|
, libjpeg
|
|
|
|
, mesa
|
2023-06-21 08:57:57 +00:00
|
|
|
, libGL
|
2020-10-11 03:09:01 +00:00
|
|
|
, eigen
|
|
|
|
, openblas
|
|
|
|
, blas
|
|
|
|
, lapack
|
2018-08-01 12:57:51 +00:00
|
|
|
}:
|
|
|
|
|
2020-03-31 14:47:18 +00:00
|
|
|
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
|
|
|
|
|
2023-06-09 20:17:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-10-11 03:09:01 +00:00
|
|
|
pname = "halide";
|
2023-04-19 06:02:07 +00:00
|
|
|
version = "15.0.1";
|
2018-08-01 12:57:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "halide";
|
|
|
|
repo = "Halide";
|
2020-10-11 03:09:01 +00:00
|
|
|
rev = "v${version}";
|
2023-04-19 06:02:07 +00:00
|
|
|
sha256 = "sha256-mnZ6QMqDr48bH2W+andGZj2EhajXKApjuW6B50xtzx0=";
|
2018-08-01 12:57:51 +00:00
|
|
|
};
|
|
|
|
|
2023-06-09 20:17:44 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DWARNINGS_AS_ERRORS=OFF"
|
|
|
|
"-DWITH_PYTHON_BINDINGS=OFF"
|
|
|
|
"-DTARGET_WEBASSEMBLY=OFF"
|
|
|
|
# Disable performance tests since they may fail on busy machines
|
|
|
|
"-DWITH_TEST_PERFORMANCE=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2018-08-01 12:57:51 +00:00
|
|
|
|
|
|
|
# Note: only openblas and not atlas part of this Nix expression
|
|
|
|
# see pkgs/development/libraries/science/math/liblapack/3.5.0.nix
|
|
|
|
# to get a hint howto setup atlas instead of openblas
|
2021-05-30 12:17:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
llvmPackages.llvm
|
|
|
|
llvmPackages.lld
|
|
|
|
llvmPackages.openmp
|
|
|
|
llvmPackages.libclang
|
2023-06-21 08:57:57 +00:00
|
|
|
libffi
|
2021-05-30 12:17:56 +00:00
|
|
|
libpng
|
|
|
|
libjpeg
|
|
|
|
eigen
|
|
|
|
openblas
|
2023-06-21 08:57:57 +00:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
mesa
|
|
|
|
libGL
|
2021-05-30 12:17:56 +00:00
|
|
|
];
|
2018-08-01 12:57:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C++ based language for image processing and computational photography";
|
|
|
|
homepage = "https://halide-lang.org";
|
|
|
|
license = licenses.mit;
|
2021-01-25 14:48:16 +00:00
|
|
|
platforms = platforms.all;
|
2023-06-21 08:57:57 +00:00
|
|
|
maintainers = with maintainers; [ ck3d atila twesterhout ];
|
2018-08-01 12:57:51 +00:00
|
|
|
};
|
|
|
|
}
|