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:
parent
3aca0e1e6c
commit
eeb4ae1c66
|
@ -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.
|
||||
|
|
31
pkgs/development/libraries/physics/geant4/tests.nix
Normal file
31
pkgs/development/libraries/physics/geant4/tests.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue