on 2c7cbb7 help sign in
5 files changed+52−3
since splitsnapshots
unifiedsplit
default.nix+11−2 haskell-overlays/ghcide.nix+34 skeleton/default.nix+3−1 skeleton/hie-bios.sh+3 skeleton/hie.yaml+1
default.nix+11−2
@@ -207,13 +207,14 @@ in rec {
207207 , shellToolOverrides ? _: _: {}
208208 , withHoogle ? false # Setting this to `true` makes shell reloading far slower
209209 , __closureCompilerOptimizationLevel ? "ADVANCED" # Set this to `null` to skip the closure-compiler step
210+ , __withGhcide ? false
210211 }:
211212 let
212213 allConfig = nixpkgs.lib.makeExtensible (self: {
213214 base = base';
214215 inherit args;
215216 userSettings = {
216− inherit android ios packages overrides tools shellToolOverrides withHoogle __closureCompilerOptimizationLevel;
217+ inherit android ios packages overrides tools shellToolOverrides withHoogle __closureCompilerOptimizationLevel __withGhcide;
217218 staticFiles = if staticFiles == null then self.base + /static else staticFiles;
218219 };
219220 frontendName = "frontend";
@@ -270,9 +271,17 @@ in rec {
270271 self.frontendName
271272 ];
272273
274+ shellToolOverrides = lib.composeExtensions
275+ self.userSettings.shellToolOverrides
276+ (if self.userSettings.__withGhcide
277+ then (import ./haskell-overlays/ghcide.nix)
278+ else (_: _: {})
279+ );
280+
273281 project = reflexPlatformProject ({...}: self.projectConfig);
274282 projectConfig = {
275− inherit (self.userSettings) shellToolOverrides tools withHoogle;
283+ inherit (self) shellToolOverrides;
284+ inherit (self.userSettings) tools withHoogle;
276285 overrides = self.totalOverrides;
277286 packages = self.combinedPackages;
278287 shells = {
haskell-overlays/ghcide.nixnew file+34
@@ -0,0 +1,34 @@
1+self: super:
2+ let
3+ pkgs = self.callPackage ({ pkgs }: pkgs) {};
4+ inherit (pkgs.haskell.lib) dontCheck;
5+ in {
6+ ghcide = pkgs.haskell.lib.justStaticExecutables (dontCheck ((self.override {
7+ overrides = self: super: {
8+ ghc-check = self.callHackageDirect {
9+ pkg = "ghc-check";
10+ ver = "0.1.0.3";
11+ sha256 = "038llbvryk5y27jbdpbshp0zw5lw1j6m7qk7vx1n96ykqdzkh649";
12+ } {};
13+ lsp-test = dontCheck (self.callHackage "lsp-test" "0.6.1.0" {});
14+ haddock-library = dontCheck (self.callHackage "haddock-library" "1.8.0" {});
15+ haskell-lsp = dontCheck (self.callHackage "haskell-lsp" "0.19.0.0" {});
16+ haskell-lsp-types = dontCheck (self.callHackage "haskell-lsp-types" "0.19.0.0" {});
17+ regex-posix = dontCheck (self.callHackage "regex-posix" "0.96.0.0" {});
18+ test-framework = dontCheck (self.callHackage "test-framework" "0.8.2.0" {});
19+ regex-base = dontCheck (self.callHackage "regex-base" "0.94.0.0" {});
20+ regex-tdfa = dontCheck (self.callHackage "regex-tdfa" "1.3.1.0" {});
21+ shake = dontCheck (self.callHackage "shake" "0.18.4" {});
22+ hie-bios = dontCheck (self.callHackageDirect {
23+ pkg = "hie-bios";
24+ ver = "0.4.0";
25+ sha256 = "19lpg9ymd9656cy17vna8wr1hvzfal94gpm2d3xpnw1d5qr37z7x";
26+ } {});
27+ };
28+ }).callCabal2nix "ghcide" (pkgs.fetchFromGitHub {
29+ owner = "digital-asset";
30+ repo = "ghcide";
31+ rev = "v0.1.0";
32+ sha256 = "1kf71iix46hvyxviimrcv7kvsj67hcnnqlpdsmazmlmybf7wbqbb";
33+ }) {}));
34+}
skeleton/default.nix+3−1
@@ -8,9 +8,11 @@
88 }
99}:
1010with obelisk;
11−project ./. ({ ... }: {
11+project ./. ({ pkgs, ... }: {
1212 android.applicationId = "systems.obsidian.obelisk.examples.minimal";
1313 android.displayName = "Obelisk Minimal Example";
1414 ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
1515 ios.bundleName = "Obelisk Minimal Example";
16+
17+ __withGhcide = true;
1618})
skeleton/hie-bios.shnew file+3
@@ -0,0 +1,3 @@
1+#!/usr/bin/env bash
2+. $HOME/.bash_profile;
3+ob internal export-ghci-configuration > "$HIE_BIOS_OUTPUT"
skeleton/hie.yamlnew file+1
@@ -0,0 +1 @@
1+cradle: { bios: { program: hie-bios.sh } }