summary refs log tree commit diff
path: root/pkgs/stdenv/mingw/simple-stdenv/default.nix
blob: bf3610e7d2bc2f2d88d9456c7d32a7c1520b35d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ system
, name
, shell
, path
, extraEnv ? {}
, extraShellOptions ? []
}:

let {
  body = 
    derivation ({
      inherit system name;
      initialPath = path;
      builder = shell;
      args = extraShellOptions ++ ["-e" ./builder.sh];
    } // extraEnv)

    // {
      mkDerivation = attrs:
        derivation ((removeAttrs attrs ["meta"]) // {
          builder = shell;
          args = extraShellOptions ++ ["-e" attrs.builder];
          stdenv = body;
          system = body.system;
        }

        // extraEnv);

      inherit shell;
    };
}