forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, nose
|
|
, matplotlib
|
|
, nibabel
|
|
, numpy
|
|
, scipy
|
|
, sympy
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
version = "0.4.2";
|
|
pname = "nipy";
|
|
disabled = pythonOlder "2.6";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1pn731nsczrx198i2gadffqmfbhviglrclv6xxwhnbv6w5hfs2yk";
|
|
};
|
|
|
|
buildInputs = stdenv.lib.optional doCheck [ nose ];
|
|
propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ];
|
|
|
|
checkPhase = '' # wants to be run in a different directory
|
|
mkdir nosetests
|
|
cd nosetests
|
|
${python.interpreter} -c "import nipy; nipy.test()"
|
|
rm -rf .
|
|
'';
|
|
|
|
# failing test:
|
|
# nipy.algorithms.statistics.models.tests.test_olsR.test_results(11.593139639404727, 11.593140144880794, 6) # disagrees by 1 at 6th decimal place
|
|
# erroring tests:
|
|
# nipy.modalities.fmri.fmristat.tests.test_FIAC.test_altprotocol
|
|
# nipy.modalities.fmri.fmristat.tests.test_FIAC.test_agreement
|
|
# nipy.tests.test_scripts.test_nipy_4d_realign # because `nipy_4d_realign` script isn't found at test time; works from nix-shell, so could be patched
|
|
# nipy.tests.test_scripts.test_nipy_3_4d # ditto re.: `nipy_3_4d` script
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://nipy.org/nipy";
|
|
description = "Software for structural and functional neuroimaging analysis";
|
|
license = licenses.bsd3;
|
|
};
|
|
|
|
}
|