about summary refs log tree commit diff
path: root/pkgs/applications/science/computer-architecture
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2024-02-17 07:19:06 -0500
committerGitHub <noreply@github.com>2024-02-17 07:19:06 -0500
commit99b92cf3e0841b0cff1c351a94a5bda784c3d165 (patch)
tree07e05deadb66df6f039c6e00a8e41209b46ea6d4 /pkgs/applications/science/computer-architecture
parent5dec53ad285711929e08008fc4174e6d0cad05fa (diff)
parent3bbdc26df2dc6eaeac472e675f3e647150bed06d (diff)
Merge pull request #288000 from trofi/timeloop-gcc-13-fix
timeloop: unstable-2022-11-29 -> 3.0.3, fix `gcc-13` build failure
Diffstat (limited to 'pkgs/applications/science/computer-architecture')
-rw-r--r--pkgs/applications/science/computer-architecture/timeloop/default.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/applications/science/computer-architecture/timeloop/default.nix b/pkgs/applications/science/computer-architecture/timeloop/default.nix
index 4e794aaa29e24..ec8ec3ed8abc6 100644
--- a/pkgs/applications/science/computer-architecture/timeloop/default.nix
+++ b/pkgs/applications/science/computer-architecture/timeloop/default.nix
@@ -15,13 +15,13 @@
 
 stdenv.mkDerivation rec {
   pname = "timeloop";
-  version = "unstable-2022-11-29";
+  version = "3.0.3";
 
   src = fetchFromGitHub {
     owner = "NVlabs";
     repo = "timeloop";
-    rev = "905ba953432c812772de935d57fd0a674a89d3c1";
-    hash = "sha256-EXiWXf8hdX4vFRNk9wbFSOsix/zVkwrafGUtFrsoAN0=";
+    rev = "v${version}";
+    hash = "sha256-CGPhrBNzFdERAA/Eym2v0+FvFUe+VkBLnwYEqEMHE9k=";
   };
 
   nativeBuildInputs = [ scons ];
@@ -46,10 +46,14 @@ stdenv.mkDerivation rec {
   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
 
   postPatch = ''
+    # Fix gcc-13 build failure due to missing includes:
+    sed -e '1i #include <cstdint>' -i \
+      include/compound-config/compound-config.hpp
+
     # use nix ar/ranlib
     substituteInPlace ./SConstruct \
-      --replace "env.Replace(AR = \"gcc-ar\")" "" \
-      --replace "env.Replace(RANLIB = \"gcc-ranlib\")" ""
+      --replace-fail "env.Replace(AR = \"gcc-ar\")" "pass" \
+      --replace-fail "env.Replace(RANLIB = \"gcc-ranlib\")" "pass"
     '' + lib.optionalString stdenv.isDarwin ''
     # prevent clang from dying on errors that gcc is fine with
     substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"