on master help sign in
Made user visible commands simpler.
24105ecRobert Klotzner
README.md+2−2
@@ -45,13 +45,13 @@ Obelisk provides an easy way to develop and deploy your [Reflex](https://github.
45When developing on obelisk itself you may launch `ghcid` for the corresponding project as follows. For example to launch ghcid for `lib/backend` project:
45When developing on obelisk itself you may launch `ghcid` for the corresponding project as follows. For example to launch ghcid for `lib/backend` project:
46
46
47```
47```
48−nix-shell -E 'let this = import ./default.nix {}; in this.reflex-platform.workOn this.obelisk this.obelisk.obelisk-backend' --run "cd lib/backend && ghcid -c 'cabal new-repl'"
48+nix-shell -A obeliskEnvs.obelisk-backend --run "cd lib/backend && ghcid -c 'cabal new-repl'"
49```
49```
50
50
51Or to launch ghcid for `lib/command` project:
51Or to launch ghcid for `lib/command` project:
52
52
53```
53```
54−nix-shell -E 'let this = import ./default.nix {}; in this.reflex-platform.workOn this.obelisk this.obelisk.obelisk-command' --run "cd lib/command && ghcid -c 'cabal new-repl'"
54+nix-shell -A obeliskEnvs.obelisk-command --run "cd lib/command && ghcid -c 'cabal new-repl'"
55```
55```
56
56
57### Accessing private repositories
57### Accessing private repositories
default.nix+5
@@ -73,6 +73,9 @@ let
73 });
73 });
74 };
74 };
75
75
76+ # Development environments for obelisk packages.
77+ ghcObeliskEnvs = mapAttrs (n: v: reflex-platform.workOn ghcObelisk ghcObelisk.${v}) ghcObelisk;
78+
76 fixUpstreamPkgs = self: super: {
79 fixUpstreamPkgs = self: super: {
77 heist = doJailbreak super.heist; #TODO: Move up to reflex-platform; create tests for r-p supported packages
80 heist = doJailbreak super.heist; #TODO: Move up to reflex-platform; create tests for r-p supported packages
78 modern-uri =
81 modern-uri =
@@ -125,6 +128,7 @@ let
125 };
128 };
126
129
127 defaultHaskellOverrides = composeExtensions fixUpstreamPkgs addLibs;
130 defaultHaskellOverrides = composeExtensions fixUpstreamPkgs addLibs;
131+
128in
132in
129with pkgs.lib;
133with pkgs.lib;
130rec {
134rec {
@@ -133,6 +137,7 @@ rec {
133 pathGit = ./.; # Used in CI by the migration graph hash algorithm to correctly ignore files.
137 pathGit = ./.; # Used in CI by the migration graph hash algorithm to correctly ignore files.
134 path = reflex-platform.filterGit ./.;
138 path = reflex-platform.filterGit ./.;
135 obelisk = ghcObelisk;
139 obelisk = ghcObelisk;
140+ obeliskEnvs = ghcObeliskEnvs;
136 commandWithMigration = ghcObelisk.obelisk-command.overrideAttrs (drv: {
141 commandWithMigration = ghcObelisk.obelisk-command.overrideAttrs (drv: {
137 postInstall = (drv.postInstall or "") +
142 postInstall = (drv.postInstall or "") +
138 ''cp -r ${./migration} $out/migration;'';
143 ''cp -r ${./migration} $out/migration;'';