2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, python, root, makeWrapper, zlib, withRootSupport ? false }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yoda";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "1.8.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
|
2020-12-25 13:55:36 +00:00
|
|
|
sha256 = "1z9jmabsaddhs003zzq73fpq2absd12rnc2sa5qn45zwf62nnbjc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
|
|
|
|
buildInputs = [ python ]
|
|
|
|
++ (with python.pkgs; [ numpy matplotlib ])
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional withRootSupport root;
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ zlib ];
|
|
|
|
|
|
|
|
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;
|
|
|
|
installCheckTarget = "check";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Provides small set of data analysis (specifically histogramming) classes";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://yoda.hepforge.org";
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ veprbl ];
|
2021-01-05 17:05:55 +00:00
|
|
|
# https://gitlab.com/hepcedar/yoda/-/issues/24
|
|
|
|
broken = withRootSupport;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|