on master help sign in
Merge pull request #62 from obsidiansystems/srid-doc-override
a458ee8Ali Abrar
README.md+27
@@ -12,6 +12,7 @@ Obelisk provides an easy way to develop and deploy your [Reflex](https://github.
12- [Mobile](#mobile)
12- [Mobile](#mobile)
13 - [iOS](#ios)
13 - [iOS](#ios)
14 - [Android](#android)
14 - [Android](#android)
15+- [Tips](#tips)
15
16
16## Installing Obelisk
17## Installing Obelisk
171. [Install Nix](https://nixos.org/nix/).
181. [Install Nix](https://nixos.org/nix/).
@@ -265,3 +266,29 @@ This should copy over and install the application on your device (if you see a
265##### Build a release version
266##### Build a release version
266
267
267After having configured signing for your app, you may proceed to build a release version of the app. This is no different to how you build the non-release version, so consult the section [Android](#android) further above for exact instructions on building and deploying to your device.
268After having configured signing for your app, you may proceed to build a release version of the app. This is no different to how you build the non-release version, so consult the section [Android](#android) further above for exact instructions on building and deploying to your device.
269+
270+## Tips
271+
272+### Adding package overrides
273+
274+To add a version override to any Haskell package, or to add a Haskell package that doesn't exist in the nixpkgs used by Obelisk, use the `overrides` attribute in your project's `default.nix`. For example, to use a specific version of the `aeson` package, your `default.nix` will look like:
275+
276+```nix
277+# ...
278+project ./. ({ pkgs, ... }: {
279+# ...
280+ overrides = self: super: let
281+ aeson = pkgs.fetchFromGitHub {
282+ owner = "obsidiansystems";
283+ repo = "aeson-gadt-th";
284+ rev = "ed573c2cccf54d72aa6279026752a3fecf9c1383";
285+ sha256 = "08q6rnz7w9pn76jkrafig6f50yd0f77z48rk2z5iyyl2jbhcbhx3";
286+ };
287+ in
288+ {
289+ aeson = self.callCabal2nix "aeson" aeson {};
290+ };
291+# ...
292+```
293+
294+For further information see [the Haskell section](https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure) of nixpkgs Contributors Guide.