From 5e000f2c8fa3de57c12ea4f1baa7379eec64e86b Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 9 Aug 2025 22:48:54 +0100 Subject: [PATCH] creduce: 2.10.0 -> 2.10.0-unstable-2024-06-01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were already applying a ton of commits on top of the latest stable release, including fixes for newer LLVM versions. Let’s bump to the latest commit and pick up support for LLVM 18. There are in‐flight PRs for LLVM 19 and 20: * * --- .../tools/misc/creduce/default.nix | 49 ++++++------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/pkgs/development/tools/misc/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix index 3efde95d5851..1984e22780c6 100644 --- a/pkgs/development/tools/misc/creduce/default.nix +++ b/pkgs/development/tools/misc/creduce/default.nix @@ -1,8 +1,7 @@ { lib, stdenv, - fetchurl, - fetchpatch, + fetchFromGitHub, cmake, makeWrapper, llvm, @@ -15,41 +14,23 @@ stdenv.mkDerivation rec { pname = "creduce"; - version = "2.10.0"; + version = "2.10.0-unstable-2024-06-01"; - src = fetchurl { - url = "https://embed.cs.utah.edu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "2xwPEjln8k1iCwQM69UwAb89zwPkAPeFVqL/LhH+oGM="; + src = fetchFromGitHub { + owner = "csmith-project"; + repo = "creduce"; + rev = "31e855e290970cba0286e5032971509c0e7c0a80"; + hash = "sha256-RbxFqZegsCxnUaIIA5OfTzx1wflCPeF+enQt90VwMgA="; }; - patches = [ - # Port to LLVM 15 - (fetchpatch { - url = "https://github.com/csmith-project/creduce/commit/e507cca4ccb32585c5692d49b8d907c1051c826c.patch"; - hash = "sha256-jO5E85AvHcjlErbUhzuQDXwQkhQsXklcTMQfWBd09OU="; - }) - (fetchpatch { - url = "https://github.com/csmith-project/creduce/commit/8d56bee3e1d2577fc8afd2ecc03b1323d6873404.patch"; - hash = "sha256-dRaBaJAYkvMyxKvfriOcg4D+4i6+6orZ85zws1AFx/s="; - }) - # Port to LLVM 16 - (fetchpatch { - url = "https://github.com/csmith-project/creduce/commit/8ab9a69caf13ce24172737e8bfd09de51a1ecb6a.patch"; - hash = "sha256-gPNXxYHnsyUvXmC0CGtsulH2Fu/EMnDE4GdOYc0UbiQ="; - }) - ]; - - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace "-std=c++11" "-std=c++17" - '' - # On Linux, c-reduce's preferred way to reason about - # the cpu architecture/topology is to use 'lscpu', - # so let's make sure it knows where to find it: - + lib.optionalString stdenv.hostPlatform.isLinux '' - substituteInPlace creduce/creduce_utils.pm --replace \ - lscpu ${util-linux}/bin/lscpu - ''; + postPatch = + # On Linux, c-reduce's preferred way to reason about + # the cpu architecture/topology is to use 'lscpu', + # so let's make sure it knows where to find it: + lib.optionalString stdenv.hostPlatform.isLinux '' + substituteInPlace creduce/creduce_utils.pm --replace \ + lscpu ${util-linux}/bin/lscpu + ''; nativeBuildInputs = [ cmake diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a08d4f67c496..17fd4bc08fc0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7011,7 +7011,7 @@ with pkgs; credstash = with python3Packages; toPythonApplication credstash; creduce = callPackage ../development/tools/misc/creduce { - inherit (llvmPackages_16) llvm libclang; + inherit (llvmPackages_18) llvm libclang; }; inherit (nodePackages) csslint;