default.nix 1.49 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
  dev-lib = hpkgs.shellFor {
23 24 25 26 27 28
    packages = p: with p; [ argotest ];
    withHoogle = true;
    buildInputs = with hpkgs; with pkgs; [ cabal-install ghcid
      hlint sysstat hdevtools];
  };

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  dev-test = pkgs.stdenv.mkDerivation rec {
    name = "env";
    env = pkgs.buildEnv { name = name; paths = buildInputs; };
    buildInputs = [
      (hpkgs.ghcWithPackages (p: [
        p.argotest
        p.turtle
        p.data-default
        p.managed
        p.ansi-terminal
        p.unix
        p.system-filepath
        p.async
        ]))
      containers
      hpkgs.hdevtools
      hpkgs.hlint
      hpkgs.ghcid
      amg
      nrm
    ];
  };

52 53 54 55 56 57 58 59 60
  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
61 62 63
  };
}