yoda: provide python3Packages.yoda

This commit is contained in:
Dmitry Kalinkin 2020-01-13 15:46:33 -05:00 committed by Jon
parent 34890e42af
commit dc57bd84b0
3 changed files with 22 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python2Packages, root, makeWrapper, zlib, withRootSupport ? false }:
{ stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
stdenv.mkDerivation rec {
pname = "yoda";
@ -9,14 +9,26 @@ stdenv.mkDerivation rec {
sha256 = "1ki88rscnym0vjxpfgql8m1lrc7vm1jb9w4jhw9lvv3rk84lpdng";
};
pythonPath = []; # python wrapper support
patches = [
# fixes "TypeError: expected bytes, str found" in writeYODA()
(fetchpatch {
url = "https://gitlab.com/hepcedar/yoda/commit/d2bbbe92912457f8a29b440cbfa0b39daf28ec34.diff";
sha256 = "1x60piswpxwak61r2sdclsc8pzi1fshpkjnxlyflsa1iap77vkq8";
})
];
buildInputs = with python2Packages; [ python numpy matplotlib makeWrapper ]
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
buildInputs = [ python ]
++ (with python.pkgs; [ numpy matplotlib ])
++ stdenv.lib.optional withRootSupport root;
propagatedBuildInputs = [ zlib ];
enableParallelBuilding = true;
postPatch = ''
touch pyext/yoda/*.{pyx,pxd}
'';
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")

View File

@ -24626,7 +24626,9 @@ in
thepeg = callPackage ../development/libraries/physics/thepeg { };
yoda = callPackage ../development/libraries/physics/yoda { };
yoda = callPackage ../development/libraries/physics/yoda {
python = python2;
};
yoda-with-root = lowPrio (yoda.override {
withRootSupport = true;
});

View File

@ -5693,6 +5693,10 @@ in {
xxhash = callPackage ../development/python-modules/xxhash { };
yoda = toPythonModule (pkgs.yoda.override {
inherit python;
});
youtube-dl = callPackage ../tools/misc/youtube-dl {};
youtube-dl-light = callPackage ../tools/misc/youtube-dl {