Merge pull request #288000 from trofi/timeloop-gcc-13-fix
timeloop: unstable-2022-11-29 -> 3.0.3, fix `gcc-13` build failure
This commit is contained in:
commit
99b92cf3e0
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "timeloop";
|
pname = "timeloop";
|
||||||
version = "unstable-2022-11-29";
|
version = "3.0.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "NVlabs";
|
owner = "NVlabs";
|
||||||
repo = "timeloop";
|
repo = "timeloop";
|
||||||
rev = "905ba953432c812772de935d57fd0a674a89d3c1";
|
rev = "v${version}";
|
||||||
hash = "sha256-EXiWXf8hdX4vFRNk9wbFSOsix/zVkwrafGUtFrsoAN0=";
|
hash = "sha256-CGPhrBNzFdERAA/Eym2v0+FvFUe+VkBLnwYEqEMHE9k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ scons ];
|
nativeBuildInputs = [ scons ];
|
||||||
|
@ -46,10 +46,14 @@ stdenv.mkDerivation rec {
|
||||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
|
||||||
|
|
||||||
postPatch = ''
|
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
|
# use nix ar/ranlib
|
||||||
substituteInPlace ./SConstruct \
|
substituteInPlace ./SConstruct \
|
||||||
--replace "env.Replace(AR = \"gcc-ar\")" "" \
|
--replace-fail "env.Replace(AR = \"gcc-ar\")" "pass" \
|
||||||
--replace "env.Replace(RANLIB = \"gcc-ranlib\")" ""
|
--replace-fail "env.Replace(RANLIB = \"gcc-ranlib\")" "pass"
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
# prevent clang from dying on errors that gcc is fine with
|
# prevent clang from dying on errors that gcc is fine with
|
||||||
substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"
|
substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user