diff --git a/bsc/ovni/default.nix b/bsc/ovni/default.nix new file mode 100644 index 0000000..16dc863 --- /dev/null +++ b/bsc/ovni/default.nix @@ -0,0 +1,30 @@ +{ + stdenv +, lib +, cmake +, mpi +, gitBranch ? "master" +, gitURL ? "ssh://git@gitlab-internal.bsc.es/nos-v/ovni.git" +, gitCommit ? "9c371d8c12ae4aed333bd7f90d0468603163ad6c" +# By default use debug +, enableDebug ? true +}: + +with lib; + +stdenv.mkDerivation rec { + pname = "ovni"; + version = "${src.shortRev}"; + + buildInputs = [ cmake mpi ]; + + cmakeBuildType = if (enableDebug) then "Debug" else "Release"; + dontStrip = true; + + src = builtins.fetchGit ({ + url = gitURL; + ref = gitBranch; + } // optionalAttrs (gitCommit != null) ({ + rev = gitCommit; + })); +} diff --git a/overlay.nix b/overlay.nix index 0c760aa..62413fd 100644 --- a/overlay.nix +++ b/overlay.nix @@ -184,6 +184,11 @@ let }; cn6 = callPackage ./bsc/cn6/default.nix { }; + ovni = callPackage ./bsc/ovni/default.nix { }; + ovniKernel = callPackage ./bsc/ovni/default.nix { + gitBranch = "kernel-context-switch"; + gitCommit = null; + }; # ================================================================= # MN4 specific