Merge pull request #288000 from trofi/timeloop-gcc-13-fix

timeloop: unstable-2022-11-29 -> 3.0.3, fix `gcc-13` build failure

authored by Mario Rodas and committed by GitHub 99b92cf3 5dec53ad

+9 -5
+9 -5
pkgs/applications/science/computer-architecture/timeloop/default.nix
··· 15 15 16 16 stdenv.mkDerivation rec { 17 17 pname = "timeloop"; 18 - version = "unstable-2022-11-29"; 18 + version = "3.0.3"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "NVlabs"; 22 22 repo = "timeloop"; 23 - rev = "905ba953432c812772de935d57fd0a674a89d3c1"; 24 - hash = "sha256-EXiWXf8hdX4vFRNk9wbFSOsix/zVkwrafGUtFrsoAN0="; 23 + rev = "v${version}"; 24 + hash = "sha256-CGPhrBNzFdERAA/Eym2v0+FvFUe+VkBLnwYEqEMHE9k="; 25 25 }; 26 26 27 27 nativeBuildInputs = [ scons ]; ··· 46 46 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto"; 47 47 48 48 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 + 49 53 # use nix ar/ranlib 50 54 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" 53 57 '' + lib.optionalString stdenv.isDarwin '' 54 58 # prevent clang from dying on errors that gcc is fine with 55 59 substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"