storj-uplink: 1.119.15 -> 1.120.4 (#375732)
[NixPkgs.git] / pkgs / by-name / li / libdicom / package.nix
blobb23fc37c56f8f595b8d3e32f6160802f91f755f0
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   uthash,
7   meson,
8   ninja,
9   pkg-config,
10   check,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "libdicom";
15   version = "1.0.5";
17   src = fetchFromGitHub {
18     owner = "ImagingDataCommons";
19     repo = "libdicom";
20     rev = "v${finalAttrs.version}";
21     sha256 = "sha256-9n0Gp9+fmTM/shgWC8zpwt1pic9BrvDubOt7f+ZDMeE=";
22   };
24   patches = [
25     (fetchpatch {
26       name = "CVE-2024-24793.CVE-2024-24794.patch";
27       url = "https://github.com/ImagingDataCommons/libdicom/commit/3661aa4cdbe9c39f67d38ae87520f9e3ed50ab16.patch";
28       excludes = [ "CHANGELOG.md" ];
29       hash = "sha256-/KTp0nKYk6jX4phNHY+nzjEptUBHKM2JkOftS5vHsEw=";
30     })
31   ];
33   buildInputs = [ uthash ];
35   nativeBuildInputs = [
36     meson
37     ninja
38     pkg-config
39   ] ++ lib.optionals (finalAttrs.finalPackage.doCheck) [ check ];
41   mesonBuildType = "release";
43   mesonFlags = lib.optionals (!finalAttrs.finalPackage.doCheck) [ "-Dtests=false" ];
45   doCheck = true;
47   meta = with lib; {
48     description = "C library for reading DICOM files";
49     homepage = "https://github.com/ImagingDataCommons/libdicom";
50     license = licenses.mit;
51     maintainers = with maintainers; [ lromor ];
52     platforms = platforms.unix;
53   };