forked from mirrors/nixpkgs
Merge pull request #103261 from veprbl/pr/gean4_tests
geant4.tests.example_B1: init
This commit is contained in:
commit
9a3ab73a5b
2 changed files with 36 additions and 0 deletions
|
@ -38,6 +38,9 @@
|
||||||
# For enablePython
|
# For enablePython
|
||||||
, boost
|
, boost
|
||||||
, python3
|
, python3
|
||||||
|
|
||||||
|
# For tests
|
||||||
|
, callPackage
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -108,6 +111,8 @@ stdenv.mkDerivation rec {
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
geant_version = version;
|
geant_version = version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tests = callPackage ./tests.nix {};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set the myriad of envars required by Geant4 if we use a nix-shell.
|
# 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…
Add table
Reference in a new issue