nixpkgs/pkgs/development/libraries/physics/yoda/default.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

2020-01-13 23:46:33 +03:00
{ stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
2016-06-11 22:31:32 +03:00
stdenv.mkDerivation rec {
pname = "yoda";
2019-06-27 17:40:41 +03:00
version = "1.7.7";
2016-06-11 22:31:32 +03:00
src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
2019-06-27 17:40:41 +03:00
sha256 = "1ki88rscnym0vjxpfgql8m1lrc7vm1jb9w4jhw9lvv3rk84lpdng";
2016-06-11 22:31:32 +03:00
};
2020-01-13 23:46:33 +03:00
patches = [
# fixes "TypeError: expected bytes, str found" in writeYODA()
(fetchpatch {
url = "https://gitlab.com/hepcedar/yoda/commit/d2bbbe92912457f8a29b440cbfa0b39daf28ec34.diff";
sha256 = "1x60piswpxwak61r2sdclsc8pzi1fshpkjnxlyflsa1iap77vkq8";
})
];
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
buildInputs = [ python ]
++ (with python.pkgs; [ numpy matplotlib ])
++ stdenv.lib.optional withRootSupport root;
2017-12-24 02:12:34 +03:00
propagatedBuildInputs = [ zlib ];
2016-06-11 22:31:32 +03:00
enableParallelBuilding = true;
2020-01-13 23:46:33 +03:00
postPatch = ''
touch pyext/yoda/*.{pyx,pxd}
'';
2016-06-11 22:31:32 +03:00
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
2018-05-29 18:22:48 +03:00
hardeningDisable = [ "format" ];
2016-06-11 22:31:32 +03:00
meta = {
description = "Provides small set of data analysis (specifically histogramming) classes";
2018-11-03 19:27:19 +03:00
license = stdenv.lib.licenses.gpl3;
2016-06-11 22:31:32 +03:00
homepage = https://yoda.hepforge.org;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ veprbl ];
2016-06-11 22:31:32 +03:00
};
}