blob: 2633f4c8db1baf94609c1546b4dd1336e7a1af1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{ stdenv, fetchurl, rpmextract, makeWrapper, patchelf, qt4, zlib, libX11, libXt, libSM, libICE, libXext, libGLU_combined }:
with stdenv.lib;
stdenv.mkDerivation {
pname = "aliza";
version = "1.48.10";
src = fetchurl {
# See https://www.aliza-dicom-viewer.com/download
url = "https://drive.google.com/uc?export=download&id=16WEScARaSrzJpJkyGuOUxDF95eUwGyET";
sha256 = "1ls16cwd0fmb5axxmy9lgf8cqrf7g7swm26f0gr2vqp4z9bw6qn3";
name = "aliza.rpm";
};
buildInputs = [ rpmextract makeWrapper ];
unpackCmd = "rpmextract $curSrc";
patchPhase = ''
sed -i 's/^Exec.*$/Exec=aliza %F/' share/applications/aliza.desktop
'';
installPhase = ''
mkdir -p $out
cp -r bin share $out
runHook postInstall
'';
postInstall = let
libs = stdenv.lib.makeLibraryPath [ qt4 zlib stdenv.cc.cc libSM libICE libX11 libXext libXt libGLU_combined ];
in ''
${patchelf}/bin/patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/aliza
${patchelf}/bin/patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/aliza-vtkvol
wrapProgram $out/bin/aliza \
--prefix LD_LIBRARY_PATH : ${libs}
wrapProgram $out/bin/aliza-vtkvol \
--prefix LD_LIBRARY_PATH : ${libs}
'';
meta = {
description = "Medical imaging software with 2D, 3D and 4D capabilities";
homepage = http://www.aliza-dicom-viewer.com;
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ mounium ];
platforms = platforms.linux;
};
}
|