aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix11
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix31
2 files changed, 39 insertions, 3 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix b/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix
index 97822d769dd5..dc809d589321 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix
@@ -38,6 +38,9 @@
# For enablePython
, boost
, python3
+
+# For tests
+, callPackage
}:
let
@@ -45,12 +48,12 @@ let
in
stdenv.mkDerivation rec {
- version = "10.6.2";
+ version = "10.6.3";
pname = "geant4";
src = fetchurl{
- url = "https://geant4-data.web.cern.ch/geant4-data/releases/geant4.10.06.p02.tar.gz";
- sha256 = "0vznm3pjlbihjy1wsxc4gj229k0dzc283wvil2xghyl08vwdpnpc";
+ url = "https://geant4-data.web.cern.ch/geant4-data/releases/geant4.10.06.p03.tar.gz";
+ sha256 = "1wzv5xky1pfm7wdfdkvqcaaqlcnsrz35dc7zcrxh8l3j5rki6pqb";
};
boost_python_lib = "python${builtins.replaceStrings ["."] [""] python3.pythonVersion}";
@@ -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.
diff --git a/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix b/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix
new file mode 100644
index 000000000000..83afee6089d4
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix
@@ -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
+ '';
+ };
+}