orthanc: init at 1.12.6

This commit is contained in:
Pol Dellaiera
2025-03-15 22:45:44 +01:00
parent f6f0df403b
commit aca5621685
2 changed files with 125 additions and 0 deletions
@@ -0,0 +1,10 @@
diff -r cba3e8ca3a87 OrthancServer/Sources/OrthancInitialization.cpp
--- a/Sources/OrthancInitialization.cpp Tue Mar 11 10:46:15 2025 +0100
+++ b/Sources/OrthancInitialization.cpp Thu Mar 13 18:20:00 2025 +0100
@@ -59,6 +59,7 @@
# undef __FILE__
# define __FILE__ __ORTHANC_FILE__
# endif
+# include <google/protobuf/stubs/common.h>
# include <google/protobuf/any.h>
#endif
+115
View File
@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchhg,
boost,
charls,
civetweb,
cmake,
curl,
dcmtk,
gtest,
jsoncpp,
libjpeg,
libpng,
libuuid,
log4cplus,
lua,
openssl,
protobuf,
pugixml,
python3,
sqlite,
unzip,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "orthanc";
version = "1.12.6";
src = fetchhg {
url = "https://orthanc.uclouvain.be/hg/orthanc/";
rev = "Orthanc-${finalAttrs.version}";
hash = "sha256-1ztA95PiCGL1oD6zVfsEhwrwGNID13/NcyZDD3eHYv0=";
};
patches = [
# Without this patch, the build fails to find `GOOGLE_PROTOBUF_VERIFY_VERSION`
# The patch has been included upstream, it need to be removed in the next release.
./add-missing-include.patch
];
sourceRoot = "${finalAttrs.src.name}/OrthancServer";
nativeBuildInputs = [
cmake
protobuf
python3
unzip
];
buildInputs = [
protobuf
boost
charls
civetweb
curl
dcmtk
gtest
jsoncpp
libjpeg
libpng
libuuid
log4cplus
lua
openssl
pugixml
sqlite
];
strictDeps = true;
enableParallelBuilding = true;
cmakeFlags = [
(lib.cmakeFeature "DCMTK_DICTIONARY_DIR_AUTO" "${dcmtk}/share/dcmtk-${dcmtk.version}")
(lib.cmakeFeature "DCMTK_LIBRARIES" "dcmjpls;oflog;ofstd")
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
(lib.cmakeBool "BUILD_CONNECTIVITY_CHECKS" false)
(lib.cmakeBool "UNIT_TESTS_WITH_HTTP_CONNEXIONS" false)
(lib.cmakeBool "STANDALONE_BUILD" true)
(lib.cmakeBool "USE_SYSTEM_BOOST" true)
(lib.cmakeBool "USE_SYSTEM_CIVETWEB" true)
(lib.cmakeBool "USE_SYSTEM_DCMTK" true)
(lib.cmakeBool "USE_SYSTEM_GOOGLE_TEST" true)
(lib.cmakeBool "USE_SYSTEM_JSONCPP" true)
(lib.cmakeBool "USE_SYSTEM_LIBICONV" true)
(lib.cmakeBool "USE_SYSTEM_LIBJPEG" true)
(lib.cmakeBool "USE_SYSTEM_LIBPNG" true)
(lib.cmakeBool "USE_SYSTEM_LUA" true)
(lib.cmakeBool "USE_SYSTEM_OPENSSL" true)
(lib.cmakeBool "USE_SYSTEM_PROTOBUF" true)
(lib.cmakeBool "USE_SYSTEM_PUGIXML" true)
(lib.cmakeBool "USE_SYSTEM_SQLITE" true)
(lib.cmakeBool "USE_SYSTEM_UUID" true)
(lib.cmakeBool "USE_SYSTEM_ZLIB" true)
];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
description = "Orthanc is a lightweight, RESTful DICOM server for healthcare and medical research";
homepage = "https://www.orthanc-server.com/";
license = lib.licenses.gpl3Plus;
mainProgram = "Orthanc";
maintainers = with lib.maintainers; [ drupol ];
platforms = lib.platforms.linux;
};
})