Update ovni to release and add useGit option
This commit is contained in:
parent
feb39f404a
commit
f5dcaf831b
@ -3,28 +3,42 @@
|
|||||||
, lib
|
, lib
|
||||||
, cmake
|
, cmake
|
||||||
, mpi
|
, mpi
|
||||||
|
, fetchFromGitHub
|
||||||
|
, useGit ? false
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitURL ? "ssh://git@bscpm03.bsc.es/rarias/ovni.git"
|
, gitURL ? "ssh://git@bscpm03.bsc.es/rarias/ovni.git"
|
||||||
, gitCommit ? null
|
, gitCommit ? "d0a47783f20f8b177a48418966dae45454193a6a"
|
||||||
# By default use debug
|
, enableDebug ? false
|
||||||
, enableDebug ? true
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
release = rec {
|
||||||
|
version = "1.2.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "bsc-pm";
|
||||||
|
repo = "ovni";
|
||||||
|
rev = "${version}";
|
||||||
|
sha256 = "sha256-J6eC62RT/0CHN7IXJuIw1c9GBkjvVEyh0HjIF7uG0FM=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
git = rec {
|
||||||
|
version = src.shortRev;
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = gitUrl;
|
||||||
|
ref = gitBranch;
|
||||||
|
rev = gitCommit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
source = if (useGit) then git else release;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ovni";
|
pname = "ovni";
|
||||||
version = "${src.shortRev}";
|
inherit (source) src version;
|
||||||
|
|
||||||
buildInputs = [ cmake mpi ];
|
buildInputs = [ cmake mpi ];
|
||||||
|
|
||||||
cmakeBuildType = if (enableDebug) then "Debug" else "Release";
|
cmakeBuildType = if (enableDebug) then "Debug" else "Release";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
src = builtins.fetchGit ({
|
|
||||||
url = gitURL;
|
|
||||||
ref = gitBranch;
|
|
||||||
} // optionalAttrs (gitCommit != null) ({
|
|
||||||
rev = gitCommit;
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
@ -260,10 +260,6 @@ let
|
|||||||
|
|
||||||
cn6 = callPackage ./bsc/cn6/default.nix { };
|
cn6 = callPackage ./bsc/cn6/default.nix { };
|
||||||
ovni = callPackage ./bsc/ovni/default.nix { };
|
ovni = callPackage ./bsc/ovni/default.nix { };
|
||||||
ovniKernel = callPackage ./bsc/ovni/default.nix {
|
|
||||||
gitBranch = "kernel-context-switch";
|
|
||||||
gitCommit = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
# =================================================================
|
# =================================================================
|
||||||
# MN4 specific
|
# MN4 specific
|
||||||
|
Loading…
Reference in New Issue
Block a user