Skip to content

Commit 99b92cf

Browse files
authored
Merge pull request #288000 from trofi/timeloop-gcc-13-fix
timeloop: unstable-2022-11-29 -> 3.0.3, fix `gcc-13` build failure
2 parents 5dec53a + 3bbdc26 commit 99b92cf

File tree

1 file changed

+9
-5
lines changed
  • pkgs/applications/science/computer-architecture/timeloop

1 file changed

+9
-5
lines changed

pkgs/applications/science/computer-architecture/timeloop/default.nix

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515

1616
stdenv.mkDerivation rec {
1717
pname = "timeloop";
18-
version = "unstable-2022-11-29";
18+
version = "3.0.3";
1919

2020
src = fetchFromGitHub {
2121
owner = "NVlabs";
2222
repo = "timeloop";
23-
rev = "905ba953432c812772de935d57fd0a674a89d3c1";
24-
hash = "sha256-EXiWXf8hdX4vFRNk9wbFSOsix/zVkwrafGUtFrsoAN0=";
23+
rev = "v${version}";
24+
hash = "sha256-CGPhrBNzFdERAA/Eym2v0+FvFUe+VkBLnwYEqEMHE9k=";
2525
};
2626

2727
nativeBuildInputs = [ scons ];
@@ -46,10 +46,14 @@ stdenv.mkDerivation rec {
4646
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
4747

4848
postPatch = ''
49+
# Fix gcc-13 build failure due to missing includes:
50+
sed -e '1i #include <cstdint>' -i \
51+
include/compound-config/compound-config.hpp
52+
4953
# use nix ar/ranlib
5054
substituteInPlace ./SConstruct \
51-
--replace "env.Replace(AR = \"gcc-ar\")" "" \
52-
--replace "env.Replace(RANLIB = \"gcc-ranlib\")" ""
55+
--replace-fail "env.Replace(AR = \"gcc-ar\")" "pass" \
56+
--replace-fail "env.Replace(RANLIB = \"gcc-ranlib\")" "pass"
5357
'' + lib.optionalString stdenv.isDarwin ''
5458
# prevent clang from dying on errors that gcc is fine with
5559
substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"

0 commit comments

Comments
 (0)