File tree 5 files changed +46
-8
lines changed
5 files changed +46
-8
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,21 @@ pkgs.mkShell ({
61
61
62
62
inherit ( quirks ) CABAL_PROJECT_LOCAL_TEMPLATE ;
63
63
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 ''
65
71
export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
66
72
${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
67
73
${ figlet } /bin/figlet -f small "*= JS edition =*"
68
74
echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
69
75
export CABAL_DIR=$HOME/.cabal-js
70
76
echo "CABAL_DIR set to $CABAL_DIR"
71
- '' + quirks . shellHook ;
77
+ echo ""
78
+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
72
79
buildInputs = [ ] ;
73
80
74
81
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 ({
143
143
144
144
inherit ( quirks ) CABAL_PROJECT_LOCAL_TEMPLATE ;
145
145
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 ''
147
153
export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
148
154
${ pkgsBuildBuild . figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
149
155
${ pkgsBuildBuild . figlet } /bin/figlet -f small "*= Windows =*"
150
156
echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
151
157
export CABAL_DIR=$HOME/.cabal-windows
152
158
echo "CABAL_DIR set to $CABAL_DIR"
153
- '' + quirks . shellHook ;
159
+ echo ""
160
+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
154
161
buildInputs = [ ] ;
155
162
156
163
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;
45
45
esac
46
46
'' ;
47
47
} ;
48
+ quirks = ( import ./quirks.nix { inherit pkgs ; } ) ;
48
49
in
49
50
pkgs . mkShell {
50
51
# The `cabal` overrride in this shell-hook doesn't do much yet. But
51
52
# we may need to massage cabal a bit, so we'll leave it in here for
52
53
# 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 ''
54
62
export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
55
63
${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
56
64
echo "Revision (input-output-hk/devx): ${ if self ? rev then self . rev else "unknown/dirty checkout" } ."
@@ -59,7 +67,8 @@ pkgs.mkShell {
59
67
# incompatbile.
60
68
export CABAL_DIR=$HOME/.cabal-devx
61
69
echo "CABAL_DIR set to $CABAL_DIR"
62
- ''
70
+ echo ""
71
+ '' + ( quirks . hint flavor )
63
72
# this one is only needed on macOS right now, due to a bug in loading libcrypto.
64
73
# The build will error with -6 due to "loading libcrypto in an unsafe way"
65
74
+ lib . optionalString stdenv . hostPlatform . isMacOS
Original file line number Diff line number Diff line change 18
18
function patchProjectLocal() {
19
19
cat ${ template } >> "$1"
20
20
}
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
21
29
'' ;
22
30
}
Original file line number Diff line number Diff line change @@ -87,7 +87,13 @@ pkgs.mkShell (rec {
87
87
# the system path.
88
88
DYLD_LIBRARY_PATH = with pkgs ; "${ lib . getLib openssl } /lib" ;
89
89
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 ''
91
97
export PS1="\[\033[01;33m\][\w]$\[\033[00m\] "
92
98
export DYLD_LIBRARY_PATH="${ DYLD_LIBRARY_PATH } ";
93
99
${ figlet } /bin/figlet -f rectangles 'IOG Haskell Shell'
@@ -97,7 +103,8 @@ pkgs.mkShell (rec {
97
103
export CABAL_DIR=$HOME/.cabal-static
98
104
echo "CABAL_DIR set to $CABAL_DIR"
99
105
echo "DYLD_LIBRARY_PATH set to $DYLD_LIBRARY_PATH"
100
- '' + quirks . shellHook ;
106
+ echo ""
107
+ '' + ( quirks . hint flavor ) + quirks . shellHook ;
101
108
# these are _target_ libs, e.g. ones we want to link the build
102
109
# product against. These are also the ones that showup in the
103
110
# PKG_CONFIG_PATH.
You can’t perform that action at this time.
0 commit comments