1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

professor: init at 2.3.3

This commit is contained in:
Dmitry Kalinkin 2021-03-15 17:05:57 -04:00
parent 5c5235bdee
commit 7adf3f8127
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, eigen, makeWrapper, python3 }:
stdenv.mkDerivation rec {
pname = "professor";
version = "2.3.3";
src = fetchurl {
name = "Professor-${version}.tar.gz";
url = "https://professor.hepforge.org/downloads/?f=Professor-${version}.tar.gz";
sha256 = "17q026r2fpfxzf74d1013ksy3a9m57rcr2q164n9x02ci40bmib0";
};
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace '-shared -o' '-shared -install_name "$(out)/$@" -o'
'';
nativeBuildInputs = [ python3.pkgs.cython makeWrapper ];
buildInputs = [ python3 eigen ];
propagatedBuildInputs = with python3.pkgs; [ iminuit numpy matplotlib yoda ];
CPPFLAGS = [ "-I${eigen}/include/eigen3" ];
PREFIX = placeholder "out";
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH "$PYTHONPATH:$(toPythonPath "$out")"
done
'';
doInstallCheck = true;
installCheckTarget = "check";
meta = with lib; {
description = "A tuning tool for Monte Carlo event generators";
homepage = "https://professor.hepforge.org/";
license = licenses.unfree; # no license specified
maintainers = [ maintainers.veprbl ];
platforms = platforms.unix;
};
}

View file

@ -28281,6 +28281,8 @@ in
elmerfem = callPackage ../applications/science/physics/elmerfem {};
professor = callPackage ../applications/science/physics/professor { };
sacrifice = callPackage ../applications/science/physics/sacrifice {};
sherpa = callPackage ../applications/science/physics/sherpa {};