Skip to content

Commit 42c8ee3

Browse files
authored
halide: 19.0.0 -> 21.0.0 (NixOS#481268)
2 parents d21c3de + cca086b commit 42c8ee3

2 files changed

Lines changed: 18 additions & 27 deletions

File tree

pkgs/development/compilers/halide/default.nix renamed to pkgs/by-name/ha/halide/package.nix

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2+
lib,
23
stdenv,
34
llvmPackages,
4-
lib,
55
fetchFromGitHub,
66
cmake,
7-
fetchpatch2,
87
flatbuffers,
98
libffi,
109
libpng,
@@ -29,29 +28,15 @@ assert blas.implementation == "openblas" && lapack.implementation == "openblas";
2928

3029
stdenv.mkDerivation (finalAttrs: {
3130
pname = "halide";
32-
version = "19.0.0";
31+
version = "21.0.0";
3332

3433
src = fetchFromGitHub {
3534
owner = "halide";
3635
repo = "Halide";
3736
tag = "v${finalAttrs.version}";
38-
hash = "sha256-0SFGX4G6UR8NS4UsdFOb99IBq2/hEkr/Cm2p6zkIh/8=";
37+
hash = "sha256-A5EnZgXc9+L+bzWHftaL74nHmP8Jf0rnT5KJAAWvKis=";
3938
};
4039

41-
patches = [
42-
# The following two patches fix cmake/HalidePackageConfigHelpers.cmake to
43-
# support specifying an absolute library install path (which is what Nix
44-
# does when "lib" is included as a separate output)
45-
(fetchpatch2 {
46-
url = "https://github.com/halide/Halide/commit/ac2cd23951aff9ac3b765e51938f1e576f1f0ee9.diff?full_index=1";
47-
hash = "sha256-JTktOTSyReDUEHTaPPMoi+/K/Gzg39i6MI97cO3654k=";
48-
})
49-
(fetchpatch2 {
50-
url = "https://github.com/halide/Halide/commit/59f4fff30f4ab628da9aa7e5f77a7f1bb218a779.diff?full_index=1";
51-
hash = "sha256-yOzE+1jai1w1GQisLYfu8F9pbTE/bYg0MTLq8rPXdGk=";
52-
})
53-
];
54-
5540
postPatch = ''
5641
substituteInPlace src/runtime/CMakeLists.txt --replace-fail \
5742
'-isystem "''${VulkanHeaders_INCLUDE_DIR}"' \
@@ -69,18 +54,18 @@ stdenv.mkDerivation (finalAttrs: {
6954
'';
7055

7156
cmakeFlags = [
72-
"-DWITH_PYTHON_BINDINGS=${if pythonSupport then "ON" else "OFF"}"
57+
(lib.cmakeBool "WITH_PYTHON_BINDINGS" pythonSupport)
7358
(lib.cmakeBool "WITH_TESTS" doCheck)
7459
(lib.cmakeBool "WITH_TUTORIALS" doCheck)
7560
# Disable performance tests since they may fail on busy machines
76-
"-DWITH_TEST_PERFORMANCE=OFF"
61+
(lib.cmakeBool "WITH_TEST_PERFORMANCE" false)
7762
# Disable fuzzing tests -- this has become the default upstream after the
7863
# v16 release (See https://github.com/halide/Halide/commit/09c5d1d19ec8e6280ccbc01a8a12decfb27226ba)
7964
# These tests also fail to compile on Darwin because of some missing command line options...
80-
"-DWITH_TEST_FUZZ=OFF"
65+
(lib.cmakeBool "WITH_TEST_FUZZ" false)
8166
# Disable FetchContent and use versions from nixpkgs instead
82-
"-DHalide_USE_FETCHCONTENT=OFF"
83-
"-DHalide_WASM_BACKEND=${if wasmSupport then "wabt" else "OFF"}"
67+
(lib.cmakeBool "Halide_USE_FETCHCONTENT" false)
68+
(lib.cmakeFeature "Halide_WASM_BACKEND" (if wasmSupport then "wabt" else "OFF"))
8469
(lib.cmakeBool "Halide_LLVM_SHARED_LIBS" wasmSupport)
8570
];
8671

@@ -101,6 +86,10 @@ stdenv.mkDerivation (finalAttrs: {
10186
"anderson2021_test_apps_autoscheduler"
10287
"correctness_cross_compilation"
10388
"correctness_simd_op_check_hvx"
89+
]
90+
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
91+
# Failed Required regular expression not found
92+
"mullapudi2016_histogram"
10493
];
10594

10695
dontUseNinjaCheck = true;
@@ -158,6 +147,7 @@ stdenv.mkDerivation (finalAttrs: {
158147
meta = {
159148
description = "C++ based language for image processing and computational photography";
160149
homepage = "https://halide-lang.org";
150+
changelog = "https://github.com/halide/Halide/releases/tag/${finalAttrs.src.tag}";
161151
license = lib.licenses.mit;
162152
platforms = lib.platforms.all;
163153
maintainers = with lib.maintainers; [
@@ -166,5 +156,10 @@ stdenv.mkDerivation (finalAttrs: {
166156
twesterhout
167157
];
168158
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
159+
badPlatforms = [
160+
# Build fails on darwin:
161+
# FAILED: [code=133] test/autoschedulers/anderson2021/anderson2021_demo.h
162+
lib.systems.inspect.patterns.isDarwin
163+
];
169164
};
170165
})

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,10 +2777,6 @@ with pkgs;
27772777

27782778
haste-client = callPackage ../tools/misc/haste-client { };
27792779

2780-
halide = callPackage ../development/compilers/halide {
2781-
llvmPackages = llvmPackages_19;
2782-
};
2783-
27842780
hareThirdParty = recurseIntoAttrs (callPackage ./hare-third-party.nix { });
27852781

27862782
hdf5 = callPackage ../tools/misc/hdf5 {

0 commit comments

Comments
 (0)