default.nix 1.05 KB
Newer Older
Valentin Reis's avatar
Valentin Reis committed
1 2 3 4 5
{
  argopkgs-src ? (builtins.fetchGit https://xgitlab.cels.anl.gov/argo/argopkgs.git) ,
  nrm-src ? (builtins.fetchGit https://xgitlab.cels.anl.gov/argo/nrm.git)
}:
let
6
  pkgs =  import argopkgs-src {};
Valentin Reis's avatar
Valentin Reis committed
7

8 9 10
  nrm = pkgs.nodelevel.nrm.overrideAttrs (old: { src =  nrm-src; });
  containers = pkgs.nodelevel.containers;
  amg = pkgs.applications.nrm.amg;
Valentin Reis's avatar
Valentin Reis committed
11

Valentin Reis's avatar
Valentin Reis committed
12 13
  filterHdevTools = builtins.filterSource (path: type: baseNameOf path != ".hdevtools.sock");

14 15
  hpkgs = pkgs.haskellPackages.override {
        overrides = self: super: rec {
Valentin Reis's avatar
Valentin Reis committed
16
        argotest = self.callCabal2nix "argotest" (filterHdevTools ./argotest) {};
17 18
    };
  };
Valentin Reis's avatar
Valentin Reis committed
19
in rec
Valentin Reis's avatar
Valentin Reis committed
20
{
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

  dev-beforelib = hpkgs.shellFor {
    packages = p: with p; [ argotest ];
    withHoogle = true;
    buildInputs = with hpkgs; with pkgs; [ cabal-install ghcid
      hlint sysstat hdevtools];
  };

  test = pkgs.stdenv.mkDerivation rec {
    name = "env";
    env = pkgs.buildEnv { name = name; paths = buildInputs; };
    buildInputs = [
      (hpkgs.ghcWithPackages (p: [p.argotest]))
      containers
      amg
      nrm
    ];
Valentin Reis's avatar
Valentin Reis committed
38 39 40
  };
}