mrtrix: 3.0_RC3_latest -> 3.0.0

This commit is contained in:
Ben Darwin 2020-04-27 16:56:08 -04:00
parent 32e4d072a0
commit 70171d321e

View File

@ -1,17 +1,17 @@
{ stdenv, lib, fetchFromGitHub, python, makeWrapper { stdenv, lib, fetchFromGitHub, python, makeWrapper
, eigen, fftw, libtiff, zlib, ants, bc , eigen, fftw, libtiff, libpng, zlib, ants, bc
, qt5, libGL, libGLU, libX11, libXext , qt5, libGL, libGLU, libX11, libXext
, withGui ? true }: , withGui ? true }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mrtrix"; pname = "mrtrix";
version = "3.0_RC3_latest"; version = "3.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MRtrix3"; owner = "MRtrix3";
repo = "mrtrix3"; repo = "mrtrix3";
rev = version; rev = version;
sha256 = "184nv524p8j94qicjy9l288bqcgl2yxqqs55a7042i0gfsnwp51c"; sha256 = "1vvmmbw3m0bdfwp4szr62ygzsvkj0ss91cx5zlkspsr1rff05f9b";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -22,7 +22,9 @@ stdenv.mkDerivation rec {
python python
fftw fftw
libtiff libtiff
zlib ] ++ lib.optionals withGui [ libpng
zlib
] ++ lib.optionals withGui [
libGL libGL
libGLU libGLU
libX11 libX11
@ -34,9 +36,14 @@ stdenv.mkDerivation rec {
installCheckInputs = [ bc ]; installCheckInputs = [ bc ];
postPatch = '' postPatch = ''
patchShebangs ./build ./configure ./run_tests ./bin/population_template patchShebangs ./build ./configure ./run_tests ./bin/*
# patching interpreters before fixup is needed for tests:
patchShebangs ./bin/*
patchShebangs testing/binaries/data/vectorstats/*py
substituteInPlace ./run_tests \ substituteInPlace ./run_tests \
--replace 'git submodule update --init >> $LOGFILE 2>&1' "" --replace 'git submodule update --init $datadir >> $LOGFILE 2>&1' ""
''; '';
configurePhase = '' configurePhase = ''
@ -50,7 +57,13 @@ stdenv.mkDerivation rec {
(cd testing && ../build) (cd testing && ../build)
''; '';
installCheckPhase = "./run_tests"; installCheckPhase = ''
./run_tests units
./run_tests binaries
# can also `./run_tests scripts`, but this fails due to lack of FSL package
# (and there's no convenient way to disable individual tests)
'';
doInstallCheck = true; doInstallCheck = true;
installPhase = '' installPhase = ''
@ -63,7 +76,9 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
for prog in $out/bin/*; do for prog in $out/bin/*; do
wrapProgram $prog --prefix PATH : ${lib.makeBinPath [ ants ]} if [[ -x "$prog" ]]; then
wrapProgram $prog --prefix PATH : ${lib.makeBinPath [ ants ]}
fi
done done
''; '';