depot/third_party/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
stdenv.mkDerivation rec {
pname = "yoda";
version = "1.9.6";
src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
hash = "sha256-IVI/ova2yPM0iVnzqUhzSpMMollR08kZC0Qk4Tc18qQ=";
};
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
buildInputs = [ python ]
++ (with python.pkgs; [ numpy matplotlib ])
++ lib.optional withRootSupport root;
propagatedBuildInputs = [ zlib ];
enableParallelBuilding = true;
postPatch = ''
touch pyext/yoda/*.{pyx,pxd}
patchShebangs .
'';
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
hardeningDisable = [ "format" ];
doInstallCheck = true;
installCheckTarget = "check";
meta = {
description = "Provides small set of data analysis (specifically histogramming) classes";
license = lib.licenses.gpl3Only;
homepage = "https://yoda.hepforge.org";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ veprbl ];
};
}