lol

eztrace: 1.1-11 -> 2.1.1, fix build, adopt

+85 -19
+27
pkgs/by-name/ez/eztrace/0001-otf2-backend-cross.patch
··· 1 + diff --git a/cmake_modules/FindOTF2.cmake b/cmake_modules/FindOTF2.cmake 2 + index 2853f92a..af1f3225 100644 3 + --- a/cmake_modules/FindOTF2.cmake 4 + +++ b/cmake_modules/FindOTF2.cmake 5 + @@ -15,11 +15,11 @@ IF(NOT OTF2_CONFIG OR NOT EXISTS ${OTF2_CONFIG}) 6 + ELSE() 7 + message(STATUS "OTF2 installation found. (using ${OTF2_CONFIG})") 8 + 9 + - execute_process(COMMAND ${OTF2_CONFIG} "--cppflags" OUTPUT_VARIABLE OTF2_INCLUDE_PATH) 10 + + execute_process(COMMAND ${OTF2_CONFIG} "--cppflags" "--target" "backend" OUTPUT_VARIABLE OTF2_INCLUDE_PATH) 11 + STRING(REPLACE "\n" "" OTF2_INCLUDE_PATH ${OTF2_INCLUDE_PATH}) 12 + STRING(REPLACE "-I" "" OTF2_INCLUDE_PATH ${OTF2_INCLUDE_PATH}) 13 + 14 + - execute_process(COMMAND ${OTF2_CONFIG} "--ldflags" OUTPUT_VARIABLE _LINK_LD_ARGS) 15 + + execute_process(COMMAND ${OTF2_CONFIG} "--ldflags" "--target" "backend" OUTPUT_VARIABLE _LINK_LD_ARGS) 16 + STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} ) 17 + FOREACH( _ARG ${_LINK_LD_ARGS} ) 18 + IF(${_ARG} MATCHES "^-L") 19 + @@ -29,7 +29,7 @@ ELSE() 20 + ENDIF(${_ARG} MATCHES "^-L") 21 + ENDFOREACH(_ARG) 22 + 23 + - execute_process(COMMAND ${OTF2_CONFIG} "--libs" OUTPUT_VARIABLE _LINK_LD_ARGS) 24 + + execute_process(COMMAND ${OTF2_CONFIG} "--libs" "--target" "backend" OUTPUT_VARIABLE _LINK_LD_ARGS) 25 + STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} ) 26 + FOREACH( _ARG ${_LINK_LD_ARGS} ) 27 + IF(${_ARG} MATCHES "^-l")
+58 -19
pkgs/by-name/ez/eztrace/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitLab, 5 + cmake, 5 6 gfortran, 6 7 libelf, 7 8 libiberty, 8 - zlib, 9 - # Once https://gitlab.com/eztrace/eztrace/-/issues/41 10 - # is released we can switch to latest binutils. 11 - libbfd_2_38, 12 - libopcodes_2_38, 13 - autoreconfHook, 9 + libbfd, 10 + libopcodes, 11 + otf2, 14 12 }: 15 13 16 - stdenv.mkDerivation rec { 17 - pname = "EZTrace"; 18 - version = "1.1-11"; 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "eztrace"; 16 + version = "2.1.1"; 17 + 18 + outputs = [ 19 + "out" 20 + "lib" 21 + "man" 22 + ]; 19 23 20 24 src = fetchFromGitLab { 21 25 owner = "eztrace"; 22 26 repo = "eztrace"; 23 - rev = "eztrace-${version}"; 24 - hash = "sha256-A6HMr4ib5Ka1lTbbTQOdq3kIdCoN/CwAKRdXdv9wpfU="; 27 + tag = "${finalAttrs.version}"; 28 + hash = "sha256-ccW4YjEf++tkdIJLze2x8B/SWbBBXnYt8UV9OH8+KGU="; 25 29 }; 26 30 31 + patches = [ 32 + ./0001-otf2-backend-cross.patch # To fix cross. 33 + ]; 34 + 35 + postPatch = '' 36 + substituteInPlace src/eztrace-lib/eztrace_otf2.c \ 37 + --replace-fail "/bin/rm" "rm" 38 + substituteInPlace cmake_modules/FindOTF2.cmake \ 39 + --replace-fail "find_program(OTF2_CONFIG otf2-config REQUIRED)" \ 40 + "find_program(OTF2_CONFIG "${lib.getExe' otf2 "otf2-config"}" REQUIRED)" \ 41 + --replace-fail "find_program(OTF2_PRINT otf2-print REQUIRED)" \ 42 + "find_program(OTF2_PRINT "${lib.getExe' otf2 "otf2-print"}" REQUIRED)" 43 + patchShebangs test 44 + ''; 45 + 46 + strictDeps = true; 47 + 48 + cmakeFlags = [ 49 + (lib.cmakeBool "EZTRACE_ENABLE_MEMORY" true) 50 + # This test is somewhat flaky and fails once per several rebuilds. 51 + (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;memory_tests") 52 + ]; 53 + 27 54 nativeBuildInputs = [ 55 + cmake 28 56 gfortran 29 - autoreconfHook 30 57 ]; 58 + 31 59 buildInputs = [ 32 60 libelf 33 61 libiberty 34 - zlib 35 - libbfd_2_38 36 - libopcodes_2_38 62 + libbfd 63 + libopcodes 64 + otf2 37 65 ]; 38 66 39 - meta = with lib; { 67 + doCheck = true; 68 + nativeCheckInputs = [ 69 + otf2 # `otf2-print` needed by compiler_instrumentation_tests,pthread_tests,posixio_tests 70 + ]; 71 + 72 + meta = { 40 73 description = "Tool that aims at generating automatically execution trace from HPC programs"; 41 - license = licenses.cecill-b; 42 - maintainers = [ ]; 74 + license = lib.licenses.cecill-b; 75 + maintainers = [ lib.maintainers.xokdvium ]; 76 + mainProgram = "eztrace"; 77 + badPlatforms = [ 78 + # Undefined symbols for architecture x86_64: 79 + # > "___cyg_profile_func_enter", referenced from: 80 + lib.systems.inspect.patterns.isDarwin 81 + ]; 43 82 }; 44 - } 83 + })