|
1 | 1 | { |
2 | 2 | lib, |
3 | 3 | stdenv, |
4 | | - fetchurl, |
5 | | - fetchpatch, |
| 4 | + fetchFromGitHub, |
6 | 5 | cmake, |
7 | 6 | makeWrapper, |
8 | 7 | llvm, |
|
15 | 14 |
|
16 | 15 | stdenv.mkDerivation rec { |
17 | 16 | pname = "creduce"; |
18 | | - version = "2.10.0"; |
| 17 | + version = "2.10.0-unstable-2024-06-01"; |
19 | 18 |
|
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="; |
23 | 24 | }; |
24 | 25 |
|
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 | + ''; |
53 | 34 |
|
54 | 35 | nativeBuildInputs = [ |
55 | 36 | cmake |
|
0 commit comments