on master help sign in
readme: Move development environment into contributing
602c73aElliot Cameron
CONTRIBUTING.md+45
@@ -8,6 +8,7 @@ Contributions and issue reports are encouraged and appreciated!
8 - [Guidelines for Pull Requests](#guidelines-for-pull-requests)
8 - [Guidelines for Pull Requests](#guidelines-for-pull-requests)
9 - [Code Quality](#code-quality)
9 - [Code Quality](#code-quality)
10 - [Documentation](#documentation)
10 - [Documentation](#documentation)
11+- [Development Environment](#development-environment)
11
12
12## Opening Issues
13## Opening Issues
13
14
@@ -39,6 +40,7 @@ For breaking changes, new features, refactors, or other major changes, the body
39
40
40Wherever possible, pull requests should add a single feature or fix a single bug. Pull requests should not bundle several unrelated changes.
41Wherever possible, pull requests should add a single feature or fix a single bug. Pull requests should not bundle several unrelated changes.
41
42
43+
42### Code Quality
44### Code Quality
43
45
44#### Warnings
46#### Warnings
@@ -77,3 +79,46 @@ Add an entry to the changelog when your PR:
77#### In the [Readme](README.md)
79#### In the [Readme](README.md)
78The 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.
80The 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.
79
81
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
70 ```
70 ```
711. Install obelisk: `nix-env -f https://github.com/obsidiansystems/obelisk/archive/master.tar.gz -iA command`
711. Install obelisk: `nix-env -f https://github.com/obsidiansystems/obelisk/archive/master.tar.gz -iA command`
72
72
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−
109### Accessing private repositories
73### Accessing private repositories
110
74
111To allow the Nix builder to access private git repositories, you must be set up
75To allow the Nix builder to access private git repositories, you must be set up