1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 11:32:03 +00:00

geant4.tests.example_B1: init

This commit is contained in:
Dmitry Kalinkin 2020-11-09 21:51:27 -05:00
parent 3aca0e1e6c
commit eeb4ae1c66
No known key found for this signature in database
GPG key ID: 06AF1D3C38F04E0E
2 changed files with 36 additions and 0 deletions

View file

@ -38,6 +38,9 @@
# For enablePython
, boost
, python3
# For tests
, callPackage
}:
let
@ -108,6 +111,8 @@ stdenv.mkDerivation rec {
inherit stdenv fetchurl;
geant_version = version;
};
tests = callPackage ./tests.nix {};
};
# Set the myriad of envars required by Geant4 if we use a nix-shell.

View file

@ -0,0 +1,31 @@
{ stdenv, cmake, geant4 }:
{
example_B1 = stdenv.mkDerivation {
name = "${geant4.name}-test-example_B1";
inherit (geant4) src;
nativeBuildInputs = [ cmake ];
buildInputs = [ geant4 ];
checkInputs = with geant4.data; [
G4EMLOW
G4ENSDFSTATE
G4PARTICLEXS
G4PhotonEvaporation
];
prePatch = ''
cd examples/basic/B1
'';
doCheck = true;
checkPhase = ''
runHook preCheck
./exampleB1 ../run2.mac
runHook postCheck
'';
};
}