Merge pull request #232786 from yl3dy/cxxopts

cxxopts: 3.0.0 -> 3.1.1

authored by

Mario Rodas and committed by
GitHub
af56b152 775c78df

+7 -23
+2 -5
pkgs/development/libraries/cxxopts/default.nix
··· 9 9 10 10 stdenv.mkDerivation rec { 11 11 pname = "cxxopts"; 12 - version = "3.0.0"; 12 + version = "3.1.1"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "jarro2783"; 16 16 repo = "cxxopts"; 17 17 rev = "v${version}"; 18 - sha256 = "08x7j168l1xwj0r3rv89cgghmfhsx98lpq35r3vkh504m1pd55a6"; 18 + sha256 = "sha256-lJPMaXBfrCeUhhXha5f7zmOGtyEDzU3oPTMirPTFZzQ="; 19 19 }; 20 - 21 - # CMake does not set CMAKE_LIBRARY_ARCHITECTURE variable in Nix, which breaks architecture-independent library path generation 22 - patches = [ ./fix-install-path.patch ]; 23 20 24 21 buildInputs = lib.optionals enableUnicodeHelp [ icu.dev ]; 25 22 cmakeFlags = [ "-DCXXOPTS_BUILD_EXAMPLES=OFF" ]
-18
pkgs/development/libraries/cxxopts/fix-install-path.patch
··· 1 - diff --git a/cmake/cxxopts.cmake b/cmake/cxxopts.cmake 2 - index 46e87ba..0ead543 100644 3 - --- a/cmake/cxxopts.cmake 4 - +++ b/cmake/cxxopts.cmake 5 - @@ -87,7 +87,12 @@ endfunction() 6 - 7 - # Helper function to ecapsulate install logic 8 - function(cxxopts_install_logic) 9 - - string(REPLACE "/${CMAKE_LIBRARY_ARCHITECTURE}" "" CMAKE_INSTALL_LIBDIR_ARCHIND "${CMAKE_INSTALL_LIBDIR}") 10 - + if(CMAKE_LIBRARY_ARCHITECTURE) 11 - + string(REPLACE "/${CMAKE_LIBRARY_ARCHITECTURE}" "" CMAKE_INSTALL_LIBDIR_ARCHIND "${CMAKE_INSTALL_LIBDIR}") 12 - + else() 13 - + # On some systems (e.g. NixOS), `CMAKE_LIBRARY_ARCHITECTURE` can be empty 14 - + set(CMAKE_INSTALL_LIBDIR_ARCHIND "${CMAKE_INSTALL_LIBDIR}") 15 - + endif() 16 - set(CXXOPTS_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR_ARCHIND}/cmake/cxxopts" CACHE STRING "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.") 17 - set(version_config "${PROJECT_BINARY_DIR}/cxxopts-config-version.cmake") 18 - set(project_config "${PROJECT_BINARY_DIR}/cxxopts-config.cmake")
+5
pkgs/development/python-modules/chiapos/default.nix
··· 43 43 pytestCheckHook 44 44 ]; 45 45 46 + # A fix for cxxopts >=3.1 47 + postPatch = '' 48 + substituteInPlace src/cli.cpp \ 49 + --replace "cxxopts::OptionException" "cxxopts::exceptions::exception" 50 + ''; 46 51 47 52 # CMake needs to be run by setuptools rather than by its hook 48 53 dontConfigure = true;