on master help sign in
readme: Move development environment into contributing
commit602c73af065e4bc1334e99afa93c4240434352b8 authorElliot Cameron <eacameron@gmail.com> dateThu 4 Jun 2020, 20:57 (6 years ago) parent604e7ad
2 files changed+45−36
CONTRIBUTING.md+45 README.md−36
CONTRIBUTING.md+45
@@ -8,6 +8,7 @@ Contributions and issue reports are encouraged and appreciated!
88 - [Guidelines for Pull Requests](#guidelines-for-pull-requests)
99 - [Code Quality](#code-quality)
1010 - [Documentation](#documentation)
11+- [Development Environment](#development-environment)
1112
1213## Opening Issues
1314
@@ -39,6 +40,7 @@ For breaking changes, new features, refactors, or other major changes, the body
3940
4041Wherever possible, pull requests should add a single feature or fix a single bug. Pull requests should not bundle several unrelated changes.
4142
43+
4244### Code Quality
4345
4446#### Warnings
@@ -77,3 +79,46 @@ Add an entry to the changelog when your PR:
7779#### In the [Readme](README.md)
7880The readme is the first place a lot of people look for information about the repository. Update any parts of the readme that are affected by your PR.
7981
82+
83+## Development Environment
84+
85+You may launch `ghcid` for the corresponding project as follows. For example to launch ghcid for `lib/backend` project:
86+
87+```bash
88+nix-shell -A obeliskEnvs.obelisk-backend --run "cd lib/backend && ghcid"
89+```
90+
91+Or to launch ghcid for `lib/command` project:
92+
93+```bash
94+nix-shell -A obeliskEnvs.obelisk-command --run "cd lib/command && ghcid"
95+```
96+
97+To re-install `ob` from source do
98+```bash
99+nix-env -f /path/to/obelisk -iA command
100+```
101+
102+You can also open a shell with the local version of `ob` available on your `PATH`:
103+
104+```bash
105+nix run -f /path/to/obelisk command
106+```
107+
108+
109+Note that `ob` will defer to the version found in your project's `.obelisk/impl` directory. To update that version specifically:
110+
111+```bash
112+ob thunk unpack ./.obelisk/impl
113+cd ./.obelisk/impl
114+# apply your changes
115+```
116+
117+If you want to commit your changes, first push them to your fork of obelisk and then
118+
119+```bash
120+cd /your/project/root
121+ob thunk pack .obelisk/impl
122+git add .obelisk/impl
123+git commit -m "Bump obelisk"
124+```
README.md−36
@@ -70,42 +70,6 @@ Obelisk is targeted primarily at Haskell developers who want to build high-quali
7070 ```
71711. Install obelisk: `nix-env -f https://github.com/obsidiansystems/obelisk/archive/master.tar.gz -iA command`
7272
73−### Contributing to Obelisk
74−
75−When developing on obelisk itself you may launch `ghcid` for the corresponding project as follows. For example to launch ghcid for `lib/backend` project:
76−
77−```bash
78−nix-shell -A obeliskEnvs.obelisk-backend --run "cd lib/backend && ghcid -c 'cabal new-repl'"
79−```
80−
81−Or to launch ghcid for `lib/command` project:
82−
83−```bash
84−nix-shell -A obeliskEnvs.obelisk-command --run "cd lib/command && ghcid -c 'cabal new-repl'"
85−```
86−
87−To re-install `ob` from source do
88−```bash
89−nix-env -f /path/to/obelisk -iA command
90−```
91−
92−Note that `ob` will defer to the version found in your project's `.obelisk/impl` directory. To update that version specifically:
93−
94−```bash
95−ob thunk unpack ./.obelisk/impl
96−cd ./.obelisk/impl
97−# apply your changes
98−```
99−
100−If you want to commit your changes, first push them to your fork of obelisk and then
101−
102−```bash
103−cd /your/project/root
104−ob thunk pack .obelisk/impl
105−git add .obelisk/impl
106−git commit -m "Bump obelisk"
107−```
108−
10973### Accessing private repositories
11074
11175To allow the Nix builder to access private git repositories, you must be set up