File tree Expand file tree Collapse file tree 5 files changed +46
-8
lines changed Expand file tree Collapse file tree 5 files changed +46
-8
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,21 @@ pkgs.mkShell ({
6161
6262 inherit ( quirks ) CABAL_PROJECT_LOCAL_TEMPLATE ;
6363
64- shellHook = with pkgs ; ''
64+ shellHook =
65+ with pkgs ;
66+ let flavor = "${ compiler-nix-name } -js"
67+ + lib . optionalString ( ! withHLS && ! withHlint ) "-minimal"
68+ + lib . optionalString withIOG "-iog"
69+ ;
70+ in ''
6571 export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
6672 ${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
6773 ${ figlet } /bin/figlet -f small "*= JS edition =*"
6874 echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
6975 export CABAL_DIR=$HOME/.cabal-js
7076 echo "CABAL_DIR set to $CABAL_DIR"
71- '' + quirks . shellHook ;
77+ echo ""
78+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
7279 buildInputs = [ ] ;
7380
7481 nativeBuildInputs = [ wrapped-hsc2hs wrapped-cabal compiler ] ++ ( with pkgs ; [
Original file line number Diff line number Diff line change @@ -143,14 +143,21 @@ pkgs.pkgsBuildBuild.mkShell ({
143143
144144 inherit ( quirks ) CABAL_PROJECT_LOCAL_TEMPLATE ;
145145
146- shellHook = with pkgs ; ''
146+ shellHook =
147+ with pkgs ;
148+ let flavor = "${ compiler-nix-name } -windows"
149+ + lib . optionalString ( ! withHLS && ! withHlint ) "-minimal"
150+ + lib . optionalString withIOG "-iog"
151+ ;
152+ in ''
147153 export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
148154 ${ pkgsBuildBuild . figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
149155 ${ pkgsBuildBuild . figlet } /bin/figlet -f small "*= Windows =*"
150156 echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
151157 export CABAL_DIR=$HOME/.cabal-windows
152158 echo "CABAL_DIR set to $CABAL_DIR"
153- '' + quirks . shellHook ;
159+ echo ""
160+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
154161 buildInputs = [ ] ;
155162
156163 nativeBuildInputs = [ wrapped-ghc wrapped-hsc2hs wrapped-cabal wine-test-wrapper compiler ] ++ ( with pkgs ; [
Original file line number Diff line number Diff line change @@ -45,12 +45,20 @@ let tool-version-map = import ./tool-map.nix;
4545 esac
4646 '' ;
4747 } ;
48+ quirks = ( import ./quirks.nix { inherit pkgs ; } ) ;
4849in
4950pkgs . mkShell {
5051 # The `cabal` overrride in this shell-hook doesn't do much yet. But
5152 # we may need to massage cabal a bit, so we'll leave it in here for
5253 # consistency with the one in static.nix.
53- shellHook = with pkgs ; ''
54+ shellHook =
55+ with pkgs ;
56+ let flavor = "${ compiler-nix-name } "
57+ + lib . optionalString ( ! withHLS && ! withHlint ) "-minimal"
58+ + lib . optionalString withIOG "-iog"
59+ + lib . optionalString withIOGFull "-full"
60+ ;
61+ in ''
5462 export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
5563 ${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
5664 echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
@@ -59,7 +67,8 @@ pkgs.mkShell {
5967 # incompatbile.
6068 export CABAL_DIR=$HOME/.cabal-devx
6169 echo "CABAL_DIR set to $CABAL_DIR"
62- ''
70+ echo ""
71+ '' + ( quirks . hint flavor )
6372 # this one is only needed on macOS right now, due to a bug in loading libcrypto.
6473 # The build will error with -6 due to "loading libcrypto in an unsafe way"
6574 + lib . optionalString stdenv . hostPlatform . isMacOS
Original file line number Diff line number Diff line change 1818 function patchProjectLocal() {
1919 cat ${ template } >> "$1"
2020 }
21+ echo ""
22+ '' ;
23+ hint = flavor : ''
24+ if [ "$GITHUB_ACTIONS" = "true" ]; then
25+ echo "::notice::Hint: to reproduce this environment locally, use either:" \
26+ "\`nix develop github:input-output-hk/devx#${ flavor } \`, or" \
27+ "\`docker run -it -v \$(pwd):/workspaces ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.${ flavor } \`"
28+ fi
2129 '' ;
2230}
Original file line number Diff line number Diff line change @@ -87,7 +87,13 @@ pkgs.mkShell (rec {
8787 # the system path.
8888 DYLD_LIBRARY_PATH = with pkgs ; "${ lib . getLib openssl } /lib" ;
8989
90- shellHook = with pkgs ; ''
90+ shellHook =
91+ with pkgs ;
92+ let flavor = "${ compiler-nix-name } -static"
93+ + lib . optionalString ( ! withHLS && ! withHlint ) "-minimal"
94+ + lib . optionalString withIOG "-iog"
95+ ;
96+ in ''
9197 export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
9298 export DYLD_LIBRARY_PATH="${ DYLD_LIBRARY_PATH } ";
9399 ${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
@@ -97,7 +103,8 @@ pkgs.mkShell (rec {
97103 export CABAL_DIR=$HOME/.cabal-static
98104 echo "CABAL_DIR set to $CABAL_DIR"
99105 echo "DYLD_LIBRARY_PATH set to $DYLD_LIBRARY_PATH"
100- '' + quirks . shellHook ;
106+ echo ""
107+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
101108 # these are _target_ libs, e.g. ones we want to link the build
102109 # product against. These are also the ones that showup in the
103110 # PKG_CONFIG_PATH.
You can’t perform that action at this time.
0 commit comments