diff --git a/garlic/apps/ifsker/default.nix b/garlic/apps/ifsker/default.nix index a6290c6..6f31330 100644 --- a/garlic/apps/ifsker/default.nix +++ b/garlic/apps/ifsker/default.nix @@ -6,49 +6,55 @@ , nanos6 , mcxx , gitBranch ? "garlic/mpi+isend+seq" +, gitCommit ? null +, garlicTools }: with stdenv.lib; -stdenv.mkDerivation rec { - name = "ifsker"; - - src = builtins.fetchGit { - url = "ssh://git@bscpm03.bsc.es/garlic/apps/ifsker.git"; - ref = gitBranch; +let + gitSource = garlicTools.fetchGarlicApp { + appName = "ifsker"; + inherit gitCommit gitBranch; + gitTable = import ./git-table.nix; }; +in + stdenv.mkDerivation rec { + name = "ifsker"; - buildInputs = [ tampi mpi nanos6 mcxx gfortran ]; + inherit (gitSource) src gitBranch gitCommit; - preferLocalBuild = true; + buildInputs = [ tampi mpi nanos6 mcxx gfortran ]; - # Mercurium seems to fail when building with fortran in parallel - enableParallelBuilding = false; + preferLocalBuild = true; - # FIXME: Patch mcxx to use other directory than $HOME for the lock - # files. - preConfigure = '' - export TAMPI_HOME=${tampi} + # Mercurium seems to fail when building with fortran in parallel + enableParallelBuilding = false; - # $HOME is required for the lock files by mcxx to compile fortran. - # So we use the $TMPDIR to store them. - export HOME=$TMPDIR - ''; + # FIXME: Patch mcxx to use other directory than $HOME for the lock + # files. + preConfigure = '' + export TAMPI_HOME=${tampi} - makeFlags = [ - "-f" "Makefile.gcc" - ]; + # $HOME is required for the lock files by mcxx to compile fortran. + # So we use the $TMPDIR to store them. + export HOME=$TMPDIR + ''; + + makeFlags = [ + "-f" "Makefile.gcc" + ]; - installPhase = '' - mkdir -p $out/bin - cp ${name} $out/bin/ + installPhase = '' + mkdir -p $out/bin + cp ${name} $out/bin/ - mkdir -p $out/etc - cp -r data $out/etc/ - cp nanos6.toml $out/etc - ''; + mkdir -p $out/etc + cp -r data $out/etc/ + cp nanos6.toml $out/etc + ''; - programPath = "/bin/${name}"; + programPath = "/bin/${name}"; -} + } diff --git a/garlic/apps/ifsker/git-table.nix b/garlic/apps/ifsker/git-table.nix new file mode 100644 index 0000000..0242708 --- /dev/null +++ b/garlic/apps/ifsker/git-table.nix @@ -0,0 +1,10 @@ +{ + # Auto-generated with garlic-git-table on 2021-04-20 for repo: + # ssh://git@bscpm03.bsc.es/garlic/apps/ifsker.git + + "garlic/mpi+isend+oss+fork" = "a6a20303101cb140571ddc1166e66843fbe83017"; + "garlic/mpi+isend+oss+task" = "a7bdb6c9b57aafbc50cdc790eb42e5bdd850f213"; + "garlic/mpi+isend+seq" = "bc97cf30835bbf6a825209485bb96fc8314e5bcb"; + "garlic/tampi+isend+oss+task" = "33408215bc231b70b60733fddea3d1b7431bb0d1"; + "garlic/tampi+send+oss+task" = "19dae956b4ef69916c0e8ad15bb6ced0085275cd"; +}