44 lines
1.2 KiB
Nix
Raw Normal View History

2020-05-20 15:29:34 -04:00
{ stdenv, fetchurl, python, root, makeWrapper, zlib, withRootSupport ? false }:
2016-06-11 15:31:32 -04:00
stdenv.mkDerivation rec {
pname = "yoda";
2020-05-20 15:29:34 -04:00
version = "1.8.2";
2016-06-11 15:31:32 -04:00
src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
2020-05-20 15:29:34 -04:00
sha256 = "1nqbv334iwdvbsc5bw8g936cxzc1hyzv9r8kjy4v124vrw8qqmc9";
2016-06-11 15:31:32 -04:00
};
2020-01-13 15:46:33 -05:00
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
buildInputs = [ python ]
++ (with python.pkgs; [ numpy matplotlib ])
++ stdenv.lib.optional withRootSupport root;
2017-12-23 18:12:34 -05:00
propagatedBuildInputs = [ zlib ];
2016-06-11 15:31:32 -04:00
enableParallelBuilding = true;
2020-01-13 15:46:33 -05:00
postPatch = ''
touch pyext/yoda/*.{pyx,pxd}
2020-05-20 15:29:34 -04:00
patchShebangs .
2020-01-13 15:46:33 -05:00
'';
2016-06-11 15:31:32 -04:00
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
2018-05-29 15:22:48 +00:00
hardeningDisable = [ "format" ];
2020-05-20 15:29:34 -04:00
doInstallCheck = true;
installCheckTarget = "check";
2016-06-11 15:31:32 -04:00
meta = {
description = "Provides small set of data analysis (specifically histogramming) classes";
2018-11-03 12:27:19 -04:00
license = stdenv.lib.licenses.gpl3;
homepage = "https://yoda.hepforge.org";
2016-06-11 15:31:32 -04:00
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ veprbl ];
2016-06-11 15:31:32 -04:00
};
}