2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, python
|
|
|
|
, root
|
|
|
|
, makeWrapper
|
|
|
|
, zlib
|
|
|
|
, withRootSupport ? false
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yoda";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.9.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-jQe7BNy3k2SFhxihggNFLY2foAAp+pQjnq+oUpAyuP8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = with python.pkgs; [
|
|
|
|
cython
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
] ++ (with python.pkgs; [
|
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
]) ++ lib.optionals withRootSupport [
|
|
|
|
root
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
zlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
touch pyext/yoda/*.{pyx,pxd}
|
2020-05-29 06:06:01 +00:00
|
|
|
patchShebangs .
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
doInstallCheck = true;
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
installCheckTarget = "check";
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Provides small set of data analysis (specifically histogramming) classes";
|
2022-12-28 21:21:41 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://yoda.hepforge.org";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://gitlab.com/hepcedar/yoda/-/blob/yoda-${version}/ChangeLog";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|