2022-07-14 12:49:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, geant4 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-03-05 16:20:37 +00:00
|
|
|
mkDataset = { pname, version, sha256, envvar }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation {
|
2022-03-05 16:20:37 +00:00
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
geant_version = geant4.version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-05 16:20:37 +00:00
|
|
|
url = "https://cern.ch/geant4-data/datasets/${pname}.${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
datadir = "${placeholder "out"}/share/Geant4-${geant4.version}/data/${pname}${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $datadir
|
|
|
|
mv ./* $datadir
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit envvar;
|
|
|
|
setupHook = ./datasets-hook.sh;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Data files for the Geant4 toolkit";
|
|
|
|
homepage = "https://geant4.web.cern.ch/support/download";
|
|
|
|
license = licenses.g4sl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2022-03-10 19:12:11 +00:00
|
|
|
builtins.listToAttrs (map (a: { name = a.pname; value = mkDataset a; }) [
|
2020-04-24 23:36:52 +00:00
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4NDL";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "4.6";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-nSh88q4PuIeirc6AHudPub4hsNFm2rSby+6UCKUUVAg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "NEUTRONHP";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4EMLOW";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "8.0";
|
|
|
|
sha256 = "sha256-2Rmo5YOGiCV7kkimE5EOsqdjMFngMMi1DAosKtn9Kzs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "LE";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4PhotonEvaporation";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "5.7";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-dh5C5W/93j2YOfn52BAmB8a0wDKRUe5Rggb07p535+U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "LEVELGAMMA";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4RadioactiveDecay";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "5.6";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-OIYHfJyOWph4PmcY4cMlZ4me6y27M+QC1Edrwv5PDfE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "RADIOACTIVE";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4SAIDDATA";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "2.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-HSao55uqceRNV1m59Vpn6Lft4xdRMWqekDfYAJDHLpE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "SAIDXS";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4PARTICLEXS";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "4.0";
|
|
|
|
sha256 = "sha256-k4EDlwPD8rD9NqtJmTYqLItP+QgMMi+QtOMZKBEzypU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "PARTICLEXS";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4ABLA";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "3.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-dpiwUrWL8bmIa+rNvWr2B63B4Jn8cwq2shz38JDAJ+0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "ABLA";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4INCL";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "1.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-cWFhghrp89BWX788LPNPTgLj5RnrQZqCI27vIsLENn0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "INCL";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4PII";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "1.3";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-YiWtkCZ19DgcmMa6JfxaBs6HVJqpeWNNPQNJHWYW6SY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "PII";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4ENSDFSTATE";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "2.3";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-lETF4IIHkavTzKrOEFsOR3kPrc4obhEUmDTnnEqOkgM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "ENSDFSTATE";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4RealSurface";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "2.2";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-mVTe4AEvUzEmf3g2kOkS5y21v1Lqm6vs0S6iIoIXaCA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "REALSURFACE";
|
|
|
|
}
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4TENDL";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "1.4";
|
|
|
|
sha256 = "sha256-S3J0AgzItO1Wm4ku8YwuCI7c22tm850lWFzO4l2XIeA=";
|
2020-06-18 07:06:33 +00:00
|
|
|
envvar = "PARTICLEHP";
|
|
|
|
}
|
2020-04-24 23:36:52 +00:00
|
|
|
])
|