default.nix 2.32 KB
Newer Older
Valentin Reis's avatar
.  
Valentin Reis committed
1
{
Valentin Reis's avatar
Valentin Reis committed
2
  hostNixpkgs ? <nixpkgs>,
Valentin Reis's avatar
Valentin Reis committed
3
  pkgs         ? import ../pin.nix {
Valentin Reis's avatar
Valentin Reis committed
4
    hostPkgs = import hostNixpkgs {};
Valentin Reis's avatar
Valentin Reis committed
5 6 7
    jsonpath =../nixpkgs-18.03.json;
  },
  datamovepkgs ? import ../pin.nix {
Valentin Reis's avatar
Valentin Reis committed
8
    hostPkgs = import hostNixpkgs {};
Valentin Reis's avatar
Valentin Reis committed
9 10
    jsonpath=../datamove.json;
  },
Valentin Reis's avatar
Valentin Reis committed
11
  packagepins ? import ./pins.nix {inherit (pkgs) stdenv fetchgit fetchgitPrivate;}
Valentin Reis's avatar
.  
Valentin Reis committed
12 13
}:
let
Valentin Reis's avatar
Valentin Reis committed
14 15
  toPath = s: ./. + s;
  gitpin = f: pkgs.fetchgit {inherit (pkgs.lib.importJSON f) url sha256 rev fetchSubmodules;};
Valentin Reis's avatar
Valentin Reis committed
16
  compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux";
Valentin Reis's avatar
.  
Valentin Reis committed
17
  callPackage = pkgs.lib.callPackageWith pkgs;
Valentin Reis's avatar
Valentin Reis committed
18
  callPackagePinWith =
19
  { path
Valentin Reis's avatar
Valentin Reis committed
20 21
  , nixName ? "default"
  , jsonName ? nixName
Valentin Reis's avatar
Valentin Reis committed
22 23 24
  , depset ? {}
  , pkgs ? pkgs
  } :
Valentin Reis's avatar
Valentin Reis committed
25 26 27 28
  let
    jsonPath = toPath "/${path}/${jsonName}.json";
  in
  pkgs.lib.callPackageWith pkgs (toPath "/${path}/${nixName}.nix") (depset // {src = gitpin jsonPath;});
Valentin Reis's avatar
Valentin Reis committed
29 30
  cpDefaultPin = path: depset: callPackagePinWith { inherit path depset;};
  cpAlternatePin = path: depset: alternate: callPackagePinWith {inherit path depset jsonName;};
Valentin Reis's avatar
Valentin Reis committed
31
  pythonPackages = pkgs.python27Packages;
Valentin Reis's avatar
.  
Valentin Reis committed
32
in rec {
33
  #NRM components
Valentin Reis's avatar
Valentin Reis committed
34

Valentin Reis's avatar
Valentin Reis committed
35 36 37 38 39 40
  nodelevel = rec {
    libnrm = callPackagePin {path="libnrm";};
    containers = cpDefaultPin "./containers" { inherit pythonPackages; };
    containers-bandit = cpAlternatePin "./containers" { inherit pythonPackages; } "bandit";
    nrm = cpDefaultPin "./nrm" { inherit pythonPackages containers; };
    nrm-bandit = cpAlternatePin "./nrm" { inherit pythonPackages containers-bandit; } "bandit";
41
  };
Valentin Reis's avatar
Valentin Reis committed
42

43 44 45
  #Instrumented applications
  applications = rec {
    lammps = pkgs.lammps-mpi;
Valentin Reis's avatar
Valentin Reis committed
46 47 48 49
    stream = callPackage {path="applications/stream";};
    openmc = callPackage {path="applications/openmc";};
    qmcpack = callPackage {path="applications/qmcpack";};
    amg = callPackage {path="applications/amg";};
Valentin Reis's avatar
Valentin Reis committed
50 51
    graph500 = cpAlternatePin "applications/simple" {} "graph500";
    simple = cpAlternatePin "applications/simple" {inherit intel; inherit (nodelevel) libnrm;} "dgemm_randomwalk";
52
  };
Valentin Reis's avatar
Valentin Reis committed
53

54 55
  #Intel compilers
  intel = with pkgs; rec {
56 57
    icc = callPackage intel/icc { inherit compiler_path; };
    mkl = callPackage intel/mkl { inherit compiler_path; };
Valentin Reis's avatar
Valentin Reis committed
58 59 60 61 62 63 64
    WrappedICC = (import ../patches/cc-wrapper  {
        inherit stdenv binutils coreutils ;
        libc = glibc;
        nativeTools = false;
        nativeLibc = false;
        cc = icc;
    });
65
  };
Valentin Reis's avatar
renames  
Valentin Reis committed
66
}