|
86 | 86 | else pkgs;
|
87 | 87 | js-pkgs = pkgs.pkgsCross.ghcjs;
|
88 | 88 | in (builtins.mapAttrs (compiler-nix-name: compiler:
|
89 |
| - import ./dynamic.nix { inherit pkgs compiler compiler-nix-name toolsModule; withIOG = false; } |
| 89 | + import ./dynamic.nix { inherit pkgs self compiler compiler-nix-name toolsModule; withIOG = false; } |
90 | 90 | ) (compilers pkgs)
|
91 | 91 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
92 | 92 | pkgs.lib.nameValuePair "${compiler-nix-name}-minimal" (
|
93 |
| - import ./dynamic.nix { inherit pkgs compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = false; } |
| 93 | + import ./dynamic.nix { inherit pkgs self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = false; } |
94 | 94 | )) (compilers pkgs)
|
95 | 95 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
96 | 96 | pkgs.lib.nameValuePair "${compiler-nix-name}-static" (
|
97 |
| - import ./static.nix { pkgs = static-pkgs; inherit compiler compiler-nix-name toolsModule; withIOG = false; } |
| 97 | + import ./static.nix { pkgs = static-pkgs; inherit self compiler compiler-nix-name toolsModule; withIOG = false; } |
98 | 98 | )) (compilers static-pkgs.buildPackages)
|
99 | 99 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
100 | 100 | pkgs.lib.nameValuePair "${compiler-nix-name}-static-minimal" (
|
101 |
| - import ./static.nix { pkgs = static-pkgs; inherit compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = false; } |
| 101 | + import ./static.nix { pkgs = static-pkgs; inherit self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = false; } |
102 | 102 | )) (compilers static-pkgs.buildPackages)
|
103 | 103 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
104 | 104 | pkgs.lib.nameValuePair "${compiler-nix-name}-js" (
|
105 |
| - import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit compiler compiler-nix-name toolsModule; } |
| 105 | + import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit self compiler compiler-nix-name toolsModule; } |
106 | 106 | )) (js-compilers js-pkgs.buildPackages)
|
107 | 107 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
108 | 108 | pkgs.lib.nameValuePair "${compiler-nix-name}-js-minimal" (
|
109 |
| - import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; } |
| 109 | + import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; } |
110 | 110 | )) (js-compilers js-pkgs.buildPackages)
|
111 | 111 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
112 | 112 | pkgs.lib.nameValuePair "${compiler-nix-name}-iog" (
|
113 |
| - import ./dynamic.nix { inherit pkgs compiler compiler-nix-name toolsModule; withIOG = true; } |
| 113 | + import ./dynamic.nix { inherit pkgs self compiler compiler-nix-name toolsModule; withIOG = true; } |
114 | 114 | )) (compilers pkgs)
|
115 | 115 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
116 | 116 | pkgs.lib.nameValuePair "${compiler-nix-name}-minimal-iog" (
|
117 |
| - import ./dynamic.nix { inherit pkgs compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
| 117 | + import ./dynamic.nix { inherit pkgs self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
118 | 118 | )) (compilers pkgs)
|
119 | 119 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
120 | 120 | pkgs.lib.nameValuePair "${compiler-nix-name}-static-iog" (
|
121 |
| - import ./static.nix { pkgs = static-pkgs; inherit compiler compiler-nix-name toolsModule; withIOG = true; } |
| 121 | + import ./static.nix { pkgs = static-pkgs; inherit self compiler compiler-nix-name toolsModule; withIOG = true; } |
122 | 122 | )) (compilers static-pkgs.buildPackages)
|
123 | 123 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
124 | 124 | pkgs.lib.nameValuePair "${compiler-nix-name}-static-minimal-iog" (
|
125 |
| - import ./static.nix { pkgs = static-pkgs; inherit compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
| 125 | + import ./static.nix { pkgs = static-pkgs; inherit self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
126 | 126 | )) (compilers static-pkgs.buildPackages)
|
127 | 127 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
128 | 128 | pkgs.lib.nameValuePair "${compiler-nix-name}-js-iog" (
|
129 |
| - import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit compiler compiler-nix-name toolsModule; withIOG = true; } |
| 129 | + import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit self compiler compiler-nix-name toolsModule; withIOG = true; } |
130 | 130 | )) (js-compilers js-pkgs.buildPackages)
|
131 | 131 | // pkgs.lib.mapAttrs' (compiler-nix-name: compiler:
|
132 | 132 | pkgs.lib.nameValuePair "${compiler-nix-name}-js-minimal-iog" (
|
133 |
| - import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
| 133 | + import ./cross-js.nix { pkgs = js-pkgs.buildPackages; inherit self compiler compiler-nix-name toolsModule; withHLS = false; withHlint = false; withIOG = true; } |
134 | 134 | )) (js-compilers js-pkgs.buildPackages)
|
135 | 135 | );
|
136 | 136 | devShells = devShellsWithToolsModule {};
|
|
143 | 143 | hydraJobs = devShells //
|
144 | 144 | (pkgs.lib.mapAttrs' (name: drv:
|
145 | 145 | pkgs.lib.nameValuePair "${name}-env" (
|
146 |
| - pkgs.runCommand "${name}-env.sh" { |
| 146 | + let env = pkgs.runCommand "${name}-env.sh" { |
147 | 147 | requiredSystemFeatures = [ "recursive-nix" ];
|
148 | 148 | nativeBuildInputs = [ pkgs.nix ];
|
149 | 149 | } ''
|
150 | 150 | nix --offline --extra-experimental-features "nix-command flakes" \
|
151 | 151 | print-dev-env ${drv.drvPath} >> $out
|
152 |
| - '')) devShellsWithEvalOnLinux) // { |
| 152 | + ''; in pkgs.writeTextFile { |
| 153 | + name = "devx"; |
| 154 | + executable = true; |
| 155 | + text = '' |
| 156 | + #!/bin/bash |
| 157 | +
|
| 158 | + set -euo pipefail |
| 159 | +
|
| 160 | + source ${env} |
| 161 | + source "$1" |
| 162 | + ''; |
| 163 | + meta = { |
| 164 | + description = "DevX shell"; |
| 165 | + longDescription = '' |
| 166 | + The DevX shell is supposed to be used with GitHub Actions, and |
| 167 | + can be used by setting the default shell to: |
| 168 | +
|
| 169 | + shell: devx {0} |
| 170 | + ''; |
| 171 | + homepage = "https://github.com/input-output-hk/devx"; |
| 172 | + license = pkgs.lib.licenses.asl20; |
| 173 | + platforms = pkgs.lib.platforms.unix; |
| 174 | + }; |
| 175 | + })) devShellsWithEvalOnLinux) // { |
153 | 176 | };
|
154 | 177 | });
|
155 | 178 |
|
|
0 commit comments