diff --git a/pkgs/applications/science/biology/N3/default.nix b/pkgs/applications/science/biology/N3/default.nix new file mode 100644 index 000000000000..feaea5b15342 --- /dev/null +++ b/pkgs/applications/science/biology/N3/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, cmake, makeWrapper, + perl, MNI-Perllib, GetoptTabular, + libminc, EBTKS }: + +stdenv.mkDerivation rec { + pname = "N3"; + name = "${pname}-1.0.20"; + + src = fetchFromGitHub { + owner = "BIC-MNI"; + repo = pname; + rev = "2fdd939f0f2b24a4039bc6a8ade4a190a1d8e75d"; + sha256 = "13z21c4r09hna3q1csvcn4i7ws5ixbdaja6ch421xv6nydjh2w5g"; + }; + + nativeBuildInputs = [ cmake makeWrapper ]; + buildInputs = [ libminc EBTKS ]; + propagatedBuildInputs = [ perl MNI-Perllib GetoptTabular ]; + + cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ]; + + checkPhase = "ctest --output-on-failure"; + # don't run the tests as they fail at least due to missing program wrappers in this phase ... + + postFixup = '' + for p in $out/bin/*; do + wrapProgram $p --prefix PERL5LIB : $PERL5LIB + done + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/BIC-MNI/${pname}"; + description = "MRI non-uniformity correction for MINC files"; + maintainers = with maintainers; [ bcdarwin ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 056b35f14263..51edd6d16e03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19749,6 +19749,10 @@ with pkgs; muscle = callPackage ../applications/science/biology/muscle/default.nix { }; + n3 = callPackage ../applications/science/biology/N3 { + inherit (perlPackages) perl GetoptTabular MNI-Perllib; + }; + neuron = callPackage ../applications/science/biology/neuron { python = null; };