Skip to content

Commit 6b40e08

Browse files
committed
done
1 parent b17cb55 commit 6b40e08

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

nix/outputs.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ let
3232
project = import ./project.nix
3333
{ inherit inputs pkgs lib metatheory r-with-packages utils; };
3434

35-
mkShell = ghc: import ./shell.nix
36-
{ inherit inputs pkgs lib project agda-tools metatheory r-with-packages ghc; };
35+
mkShell = project-variant: import ./shell.nix
36+
{ inherit inputs pkgs lib project agda-tools metatheory r-with-packages project-variant; };
3737

3838
exposed-haskell-packages = {
3939
plutus-core-test = project.flake'.packages."plutus-core:test:plutus-core-test";
@@ -113,7 +113,7 @@ let
113113

114114
devShells =
115115
(non-profiled-shells) //
116-
{ profiled = mkShell project.projectVariants.ghc96-profiled; } //
116+
{ profiled = mkShell "ghc96-profiled"; } //
117117
{ metatheory-jailbreak = metatheory-jailbreak-shell; };
118118

119119
full-nested-ci-jobs = {

nix/shell.nix

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# editorconfig-checker-disable-file
22

3-
{ inputs, pkgs, lib, project, agda-tools, metatheory, r-with-packages, ghc }:
3+
{ inputs, pkgs, lib, project, agda-tools, metatheory, r-with-packages, project-variant }:
44

55
let
66

77
# Toolchain versions used in dev shells. Consumed by `project.shellFor`.
8-
all-tools = {
8+
tools = rec {
99
"ghc96".cabal = project.projectVariants.ghc96.tool "cabal" "3.12.1.0";
1010
"ghc96".cabal-fmt = project.projectVariants.ghc96.tool "cabal-fmt" "latest";
1111
"ghc96".haskell-language-server = project.projectVariants.ghc96.tool "haskell-language-server" "latest";
@@ -21,9 +21,10 @@ let
2121
"ghc912".fourmolu = project.projectVariants.ghc912.tool "fourmolu" "latest";
2222
"ghc912".hlint = project.projectVariants.ghc912.tool "hlint" "latest";
2323
"ghc912".hp2ps = project.projectVariants.ghc912.tool "hp2ps" "latest";
24-
};
2524

26-
tools = all-tools.${ghc};
25+
"ghc96-profiled" = tools."ghc96";
26+
27+
}.${project-variant};
2728

2829
# Pre-commit hooks for the repo. Injects into shell via shellHook.
2930
pre-commit-check = inputs.pre-commit-hooks.lib.${pkgs.system}.run {
@@ -131,8 +132,8 @@ let
131132
"export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive";
132133

133134
# Full developer shell with many tools.
134-
full-shell = project.projectVariants.${ghc}.shellFor {
135-
name = "plutus-shell-${ghc}";
135+
full-shell = project.projectVariants.${project-variant}.shellFor {
136+
name = "plutus-shell-${project-variant}";
136137

137138
buildInputs = lib.concatLists [
138139
common-pkgs
@@ -153,8 +154,8 @@ let
153154

154155

155156
# Lightweight shell with minimal tools.
156-
quick-shell = project.projectVariants.${ghc}.shellFor {
157-
name = "plutus-shell-${ghc}";
157+
quick-shell = project.projectVariants.${project-variant}.shellFor {
158+
name = "plutus-shell-${project-variant}";
158159
tools = { cabal = "latest"; };
159160
shellHook = ''
160161
${locale-archive-hook}
@@ -167,10 +168,11 @@ let
167168
# Select shell by compiler used in the project variant.
168169
shell = {
169170
ghc96 = full-shell;
171+
ghc96-profiled = full-shell;
170172
ghc98 = quick-shell;
171173
ghc910 = quick-shell;
172174
ghc912 = full-shell;
173-
}.${ghc};
175+
}.${project-variant};
174176

175177
in
176178

0 commit comments

Comments
 (0)