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";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "4.7.1";
|
|
|
|
sha256 = "sha256-06yuSGIhGNJXneJKVNUz+yQWvw2p3SiPFyTfFIWkbHw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "NEUTRONHP";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4EMLOW";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "8.5";
|
|
|
|
sha256 = "sha256-ZrrKSaxdReKsEMEltPsmYiXlEYA+ZpgZCc6c0+m873M=";
|
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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.3";
|
|
|
|
sha256 = "sha256-HgQbMlLunO+IbWJPdT5pMwOqMtfl7zu6h7NPNtkuorE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
envvar = "ABLA";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "G4INCL";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.2";
|
|
|
|
sha256 = "sha256-+ICxYHPuCpLXSU8ydqbVLU3h02d6DUx8WHADlu0OGn4=";
|
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
|
|
|
])
|