From 5d2936b3da2d5d5aae2e0c43516d770d43463477 Mon Sep 17 00:00:00 2001 From: Florian Engel Date: Thu, 15 Dec 2022 16:25:33 +0100 Subject: [PATCH] dcmkt: Fix build --- .../science/medicine/dcmtk/0001-Fix-cmake.patch | 12 ++++++++++++ pkgs/applications/science/medicine/dcmtk/default.nix | 9 +++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch diff --git a/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch b/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch new file mode 100644 index 000000000000..053edac85b21 --- /dev/null +++ b/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/dcmtk.pc.in b/CMake/dcmtk.pc.in +index 13c79c0d5..b1edf725c 100644 +--- a/CMake/dcmtk.pc.in ++++ b/CMake/dcmtk.pc.in +@@ -1,6 +1,6 @@ + prefix="@CMAKE_INSTALL_PREFIX@" + exec_prefix="${prefix}" +- libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@" ++ libdir=@CMAKE_INSTALL_FULL_LIBDIR@" + includedir="${prefix}/include/" + + Name: DCMTK diff --git a/pkgs/applications/science/medicine/dcmtk/default.nix b/pkgs/applications/science/medicine/dcmtk/default.nix index a1f4b455ce79..3b4361228635 100644 --- a/pkgs/applications/science/medicine/dcmtk/default.nix +++ b/pkgs/applications/science/medicine/dcmtk/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, zlib, libtiff, libxml2, openssl, libiconv, libpng, cmake }: +{ lib, stdenv, fetchFromGitHub, zlib, libtiff, libxml2, openssl, libiconv +, libpng, cmake, fetchpatch }: with lib; stdenv.mkDerivation rec { @@ -14,8 +15,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libpng zlib libtiff libxml2 openssl libiconv ]; + # This is only needed until https://github.com/DCMTK/dcmtk/pull/75/files is merged + patches = [ ./0001-Fix-cmake.patch ]; + meta = { - description = "Collection of libraries and applications implementing large parts of the DICOM standard"; + description = + "Collection of libraries and applications implementing large parts of the DICOM standard"; longDescription = '' DCMTK is a collection of libraries and applications implementing large parts of the DICOM standard. It includes software for examining, constructing and converting DICOM image files, handling offline media,