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