3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/medicine/aliza/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.8 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchurl, rpmextract, makeWrapper, patchelf, qt4, zlib, libX11, libXt, libSM, libICE, libXext, libGLU, libGL }:
2017-06-03 15:33:52 +01:00
2021-01-15 13:21:58 +00:00
with lib;
2017-06-03 15:33:52 +01:00
stdenv.mkDerivation {
2019-05-21 10:31:38 +01:00
pname = "aliza";
2021-03-27 15:19:31 +00:00
version = "1.98.57";
2017-06-03 15:33:52 +01:00
src = fetchurl {
2019-05-21 10:31:38 +01:00
# See https://www.aliza-dicom-viewer.com/download
2021-03-27 15:19:31 +00:00
urls = [
"https://drive.google.com/uc?export=download&id=1-AXa3tjy_onecW2k7ftjAQl0KGTb0B1Y"
"https://web.archive.org/web/20210327224315/https://doc-0s-0s-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/1lgjid9ti29rdf5ebmd7o58iqhs3gfpo/1616884950000/16072287944266838401/*/1-AXa3tjy_onecW2k7ftjAQl0KGTb0B1Y?e=download"
];
sha256 = "01qk2gadmc24pmfdnmpiz7vgfiqkvhznyq9rsr153frscg76gc9b";
2017-06-03 15:33:52 +01:00
name = "aliza.rpm";
};
2021-03-27 15:19:31 +00:00
nativeBuildInputs = [ makeWrapper rpmextract ];
2017-06-03 15:33:52 +01:00
unpackCmd = "rpmextract $curSrc";
2021-03-27 15:19:31 +00:00
postPatch = ''
2017-06-03 15:33:52 +01:00
sed -i 's/^Exec.*$/Exec=aliza %F/' share/applications/aliza.desktop
'';
installPhase = ''
2021-03-27 15:19:31 +00:00
runHook preInstall
2017-06-03 15:33:52 +01:00
mkdir -p $out
cp -r bin share $out
runHook postInstall
'';
postInstall = let
2021-01-15 13:21:58 +00:00
libs = lib.makeLibraryPath [ qt4 zlib stdenv.cc.cc libSM libICE libX11 libXext libXt libGLU libGL ];
2017-06-03 15:33:52 +01:00
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 = "https://www.aliza-dicom-viewer.com";
2017-06-03 15:33:52 +01:00
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ mounium ];
2019-05-21 10:31:38 +01:00
platforms = platforms.linux;
2017-06-03 15:33:52 +01:00
};
}