3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
2021-11-24 17:19:05 -05:00

44 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
stdenv.mkDerivation rec {
pname = "yoda";
version = "1.9.3";
src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
hash = "sha256-XRUYL7gAoNX/ykdD+CwpXsYu5yzz5GJbZNAIP/+gR98=";
};
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 ];
};
}