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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2021-11-11 22:55:53 +00:00
{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
2016-06-11 19:31:32 +00:00
stdenv.mkDerivation rec {
pname = "yoda";
2021-12-26 19:30:21 +00:00
version = "1.9.4";
2016-06-11 19:31:32 +00:00
src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
2021-12-26 19:30:21 +00:00
hash = "sha256-KifrhuZH11szennCDC2sJeHxO9JZJbnJWuKK3JN5NwU=";
2016-06-11 19:31:32 +00:00
};
2020-01-13 20:46:33 +00:00
nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
buildInputs = [ python ]
++ (with python.pkgs; [ numpy matplotlib ])
++ lib.optional withRootSupport root;
2017-12-23 23:12:34 +00:00
propagatedBuildInputs = [ zlib ];
2016-06-11 19:31:32 +00:00
enableParallelBuilding = true;
2020-01-13 20:46:33 +00:00
postPatch = ''
touch pyext/yoda/*.{pyx,pxd}
2020-05-20 19:29:34 +00:00
patchShebangs .
2020-01-13 20:46:33 +00:00
'';
2016-06-11 19:31:32 +00:00
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
2018-05-29 15:22:48 +00:00
hardeningDisable = [ "format" ];
2020-05-20 19:29:34 +00:00
doInstallCheck = true;
installCheckTarget = "check";
2021-10-24 22:04:52 +00:00
2016-06-11 19:31:32 +00:00
meta = {
description = "Provides small set of data analysis (specifically histogramming) classes";
2021-11-24 22:19:05 +00:00
license = lib.licenses.gpl3Only;
2021-11-11 22:59:07 +00:00
homepage = "https://yoda.hepforge.org";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ veprbl ];
2016-06-11 19:31:32 +00:00
};
}