diff --git a/pkgs/by-name/ya/yarp/0001-format-security.patch b/pkgs/by-name/ya/yarp/0001-format-security.patch new file mode 100644 index 000000000000..dc5e55f8712e --- /dev/null +++ b/pkgs/by-name/ya/yarp/0001-format-security.patch @@ -0,0 +1,13 @@ +diff --git i/src/libYARP_companion/src/yarp/companion/impl/Companion.cmdSplit.cpp w/src/libYARP_companion/src/yarp/companion/impl/Companion.cmdSplit.cpp +index a9024cb03..f4860ac62 100644 +--- i/src/libYARP_companion/src/yarp/companion/impl/Companion.cmdSplit.cpp ++++ w/src/libYARP_companion/src/yarp/companion/impl/Companion.cmdSplit.cpp +@@ -111,7 +111,7 @@ int Companion::cmdSplit(int argc, char *argv[]) + inData->mutex.unlock(); + if (siz != 0) + { +- yCInfo(COMPANION, std::string("Received a Bottle of "+std::to_string(siz)+" elements.").c_str()); ++ yCInfo(COMPANION, "Received a Bottle of %z elements.", siz); + outPort = new BufferedPort [siz]; + for (size_t i = 0; i < siz; i++) + { diff --git a/pkgs/by-name/ya/yarp/package.nix b/pkgs/by-name/ya/yarp/package.nix index f14e40f931fa..71ef9b5dfc53 100644 --- a/pkgs/by-name/ya/yarp/package.nix +++ b/pkgs/by-name/ya/yarp/package.nix @@ -4,20 +4,30 @@ fetchFromGitHub, cmake, ace, + ycm-cmake-modules, + nix-update-script, }: stdenv.mkDerivation rec { pname = "yarp"; - version = "2.3.70.2"; + version = "3.12.1"; src = fetchFromGitHub { owner = "robotology"; repo = "yarp"; rev = "v${version}"; - sha256 = "0mphh899niy30xbjjwi9xpsliq8mladfldbbbjfngdrqfhiray1a"; + hash = "sha256-6PyXMEUh0ENsRjbsXbwDr4ZqAulw8rgY5G0l/RewWys="; }; nativeBuildInputs = [ cmake ]; - buildInputs = [ ace ]; + buildInputs = [ + ace + ycm-cmake-modules + ]; + + patches = [ + # Weird string interpolation causes compilation to fail due to -Wformat-security. + ./0001-format-security.patch + ]; cmakeFlags = [ "-DYARP_COMPILE_UNMAINTAINED:BOOL=ON" @@ -28,6 +38,8 @@ stdenv.mkDerivation rec { postInstall = "mv ./$out/lib/*.so $out/lib/"; + passthru.updateScript = nix-update-script { }; + meta = { description = "Yet Another Robot Platform"; homepage = "http://yarp.it";