Giter Club home page Giter Club logo

rhyolite's Introduction

Using Rhyolite with an Obelisk project

  1. Within an already initialized Obelisk project, clone Rhyolite into the dep directory, if you haven’t already:
git clone https://github.com/obsidiansystems/rhyolite dep/rhyolite
  1. Add Rhyolite’s haskellOverrides to default.nix so that your package can access them. This involves adding overrides to the arguments passed to Obelisk’s project function so that it imports Rhyolite’s haskellOverrides. You can base it off of this example:
{ system ? builtins.currentSystem # TODO: Get rid of this system cruft
, iosSdkVersion ? "10.2"
}:
with import ./.obelisk/impl { inherit system iosSdkVersion; };
project ./. ({ pkgs, hackGet, ... }: {

  overrides = pkgs.lib.composeExtensions (pkgs.callPackage (hackGet ./dep/rhyolite) {}).haskellOverrides
    (self: super: with pkgs.haskell.lib; {
      # Your custom overrides go here.
    });

  android.applicationId = "systems.obsidian.obelisk.examples.minimal";
  android.displayName = "Obelisk Minimal Example";
  ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
  ios.bundleName = "Obelisk Minimal Example";
})
  1. You can now add any of Rhyolite’s packages as dependencies to your Obelisk project. Here is the full list of packages provided:

    • rhyolite-aeson-orphans
    • rhyolite-backend
    • rhyolite-backend-db
    • rhyolite-backend-db-gargoyle
    • rhyolite-backend-snap
    • rhyolite-common
    • rhyolite-datastructures
    • rhyolite-frontend

Alternative method

You can also let Rhyolite manage Obelisk directly. This is easier to setup but also means that you are stuck with the Obelisk version used by Rhyolite.

To do this, simply overwrite the .obelisk/impl/github.json file with this Rhyolite thunk:

{
  "owner": "obsidiansystems",
  "repo": "rhyolite",
  "branch": "master",
  "rev": "06b9851a101408a86a4ec0b7df5b2f71bc532ab0",
  "sha256": "18adbc1nnj94qhggpcxmpd5i1rz0zx93cpphl09mw4c7s65rzah7"
}

Hacking

On backend

nix-shell -A proj.shells.ghc --run 'cabal new-repl lib:rhyolite-backend'

On frontend

nix-shell -A proj.shells.ghc --run 'cabal new-repl lib:rhyolite-frontend'

rhyolite's People

Contributors

3noch avatar alexfmpe avatar ali-abrar avatar cgibbard avatar dalaing avatar danbornside avatar ericson2314 avatar hsloan avatar luigy avatar matthewbauer avatar srid avatar xplat avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.