default.nix 1.75 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
  dev-test = pkgs.stdenv.mkDerivation rec {
Valentin Reis's avatar
Valentin Reis committed
30
31
32
33
    shellHook = ''
      source completions/bash/argotk.sh
      echo "Installed bash completions."
    '';
34
35
36
37
38
39
40
41
42
43
44
45
    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
46
        (pkgs.haskell.lib.doJailbreak p.panpipe)
47
48
49
50
51
52
53
54
55
56
        ]))
      containers
      hpkgs.hdevtools
      hpkgs.hlint
      hpkgs.ghcid
      amg
      nrm
    ];
  };

57
  test = pkgs.stdenv.mkDerivation rec {
58
59
60
61
    shellHook = ''
      source completions/bash/argotk.sh
      echo "Installed bash completions."
    '';
62
63
64
65
66
67
68
69
    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
70
71
72
  };
}