default.nix 1.98 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;
18 19
  callPackagePin =
  { path
Valentin Reis's avatar
Valentin Reis committed
20 21
  , nixName ? "default"
  , jsonName ? nixName
22
  , depset ? {} } :
Valentin Reis's avatar
Valentin Reis committed
23 24 25 26
  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
27
  pythonPackages = pkgs.python27Packages;
Valentin Reis's avatar
.  
Valentin Reis committed
28
in rec {
29
  #NRM components
Valentin Reis's avatar
Valentin Reis committed
30 31 32 33
  libnrm = callPackagePin {path="libnrm";};
  nrm-containers = callPackagePin {path = "./containers";
    depset= { inherit pythonPackages; };
    jsonName = "bandit";
34 35 36 37 38
  };
  nrm = callPackage ./nrm {
    inherit pythonPackages nrm-containers;
    src = packagepins.nrm.bandit;
  };
Valentin Reis's avatar
Valentin Reis committed
39

40 41 42 43 44 45 46
  #Instrumented applications
  applications = rec {
    lammps = pkgs.lammps-mpi;
    amg = callPackage applications/amg {};
    qmcpack = callPackage applications/qmcpack {};
    openmc = callPackage applications/openmc {};
    stream = callPackage applications/stream {};
47 48
    graph500 = callPackagePin {path="applications/simple/graph500";};
    simple = callPackagePin {path="applications/simple/dgemm_randomwalk"; depset={inherit intel libnrm;};};
49
  };
Valentin Reis's avatar
Valentin Reis committed
50

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