Skip to content

Commit 5e000f2

Browse files
committed
creduce: 2.10.0 -> 2.10.0-unstable-2024-06-01
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: * <csmith-project/creduce#285> * <csmith-project/creduce#287>
1 parent e6a984e commit 5e000f2

File tree

2 files changed

+16
-35
lines changed

2 files changed

+16
-35
lines changed

pkgs/development/tools/misc/creduce/default.nix

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
lib,
33
stdenv,
4-
fetchurl,
5-
fetchpatch,
4+
fetchFromGitHub,
65
cmake,
76
makeWrapper,
87
llvm,
@@ -15,41 +14,23 @@
1514

1615
stdenv.mkDerivation rec {
1716
pname = "creduce";
18-
version = "2.10.0";
17+
version = "2.10.0-unstable-2024-06-01";
1918

20-
src = fetchurl {
21-
url = "https://embed.cs.utah.edu/${pname}/${pname}-${version}.tar.gz";
22-
sha256 = "2xwPEjln8k1iCwQM69UwAb89zwPkAPeFVqL/LhH+oGM=";
19+
src = fetchFromGitHub {
20+
owner = "csmith-project";
21+
repo = "creduce";
22+
rev = "31e855e290970cba0286e5032971509c0e7c0a80";
23+
hash = "sha256-RbxFqZegsCxnUaIIA5OfTzx1wflCPeF+enQt90VwMgA=";
2324
};
2425

25-
patches = [
26-
# Port to LLVM 15
27-
(fetchpatch {
28-
url = "https://github.com/csmith-project/creduce/commit/e507cca4ccb32585c5692d49b8d907c1051c826c.patch";
29-
hash = "sha256-jO5E85AvHcjlErbUhzuQDXwQkhQsXklcTMQfWBd09OU=";
30-
})
31-
(fetchpatch {
32-
url = "https://github.com/csmith-project/creduce/commit/8d56bee3e1d2577fc8afd2ecc03b1323d6873404.patch";
33-
hash = "sha256-dRaBaJAYkvMyxKvfriOcg4D+4i6+6orZ85zws1AFx/s=";
34-
})
35-
# Port to LLVM 16
36-
(fetchpatch {
37-
url = "https://github.com/csmith-project/creduce/commit/8ab9a69caf13ce24172737e8bfd09de51a1ecb6a.patch";
38-
hash = "sha256-gPNXxYHnsyUvXmC0CGtsulH2Fu/EMnDE4GdOYc0UbiQ=";
39-
})
40-
];
41-
42-
postPatch = ''
43-
substituteInPlace CMakeLists.txt \
44-
--replace "-std=c++11" "-std=c++17"
45-
''
46-
# On Linux, c-reduce's preferred way to reason about
47-
# the cpu architecture/topology is to use 'lscpu',
48-
# so let's make sure it knows where to find it:
49-
+ lib.optionalString stdenv.hostPlatform.isLinux ''
50-
substituteInPlace creduce/creduce_utils.pm --replace \
51-
lscpu ${util-linux}/bin/lscpu
52-
'';
26+
postPatch =
27+
# On Linux, c-reduce's preferred way to reason about
28+
# the cpu architecture/topology is to use 'lscpu',
29+
# so let's make sure it knows where to find it:
30+
lib.optionalString stdenv.hostPlatform.isLinux ''
31+
substituteInPlace creduce/creduce_utils.pm --replace \
32+
lscpu ${util-linux}/bin/lscpu
33+
'';
5334

5435
nativeBuildInputs = [
5536
cmake

pkgs/top-level/all-packages.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7011,7 +7011,7 @@ with pkgs;
70117011
credstash = with python3Packages; toPythonApplication credstash;
70127012

70137013
creduce = callPackage ../development/tools/misc/creduce {
7014-
inherit (llvmPackages_16) llvm libclang;
7014+
inherit (llvmPackages_18) llvm libclang;
70157015
};
70167016

70177017
inherit (nodePackages) csslint;

0 commit comments

Comments
 (0)