Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 999e24d24722
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9a3ab73a5b8b
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 10, 2020

  1. geant4.tests.example_B1: init

    veprbl committed Nov 10, 2020
    Copy the full SHA
    eeb4ae1 View commit details

Commits on Nov 11, 2020

  1. Merge pull request #103261 from veprbl/pr/gean4_tests

    geant4.tests.example_B1: init
    veprbl authored Nov 11, 2020
    Copy the full SHA
    9a3ab73 View commit details
Showing with 36 additions and 0 deletions.
  1. +5 −0 pkgs/development/libraries/physics/geant4/default.nix
  2. +31 −0 pkgs/development/libraries/physics/geant4/tests.nix
5 changes: 5 additions & 0 deletions pkgs/development/libraries/physics/geant4/default.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 31 additions & 0 deletions pkgs/development/libraries/physics/geant4/tests.nix
Original file line number Diff line number Diff line change
@@ -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
'';
};
}