mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{ stdenv
|
|
, llvmPackages
|
|
, lib
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, libffi
|
|
, libpng
|
|
, libjpeg
|
|
, mesa
|
|
, libGL
|
|
, eigen
|
|
, openblas
|
|
, blas
|
|
, lapack
|
|
}:
|
|
|
|
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "halide";
|
|
version = "15.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "halide";
|
|
repo = "Halide";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-mnZ6QMqDr48bH2W+andGZj2EhajXKApjuW6B50xtzx0=";
|
|
};
|
|
|
|
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;
|
|
|
|
# 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
|
|
buildInputs = [
|
|
llvmPackages.llvm
|
|
llvmPackages.lld
|
|
llvmPackages.openmp
|
|
llvmPackages.libclang
|
|
libffi
|
|
libpng
|
|
libjpeg
|
|
eigen
|
|
openblas
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
mesa
|
|
libGL
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
meta = with lib; {
|
|
description = "C++ based language for image processing and computational photography";
|
|
homepage = "https://halide-lang.org";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ ck3d atila twesterhout ];
|
|
};
|
|
}
|