Skip to content

Instantly share code, notes, and snippets.

@mputz86
Created September 27, 2019 11:10
Show Gist options
  • Save mputz86/3a48c964594966560da8ef4a172bf715 to your computer and use it in GitHub Desktop.
Save mputz86/3a48c964594966560da8ef4a172bf715 to your computer and use it in GitHub Desktop.
{ obelisk ? import ./.obelisk/impl {
system = builtins.currentSystem;
iosSdkVersion = "10.2";
}
}:
with obelisk;
project ./. ({ pkgs, ... }: {
withHoogle = true;
android.applicationId = "systems.obsidian.obelisk.examples.minimal";
android.displayName = "Obelisk Minimal Example";
ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
ios.bundleName = "Obelisk Minimal Example";
overrides = self: super: with pkgs.haskell.lib; let
# Local git.
# Fix for transformers 0.5.6.2. Just added Control.Monad.Trans.Writer.CPS within RON.
ron-src = pkgs.fetchgit {
url = "file:///Users/mputz/Projects/simpl-fant/workspace-hs/simpl-fant-test/reflex-obelisk-ron/libs/ron";
rev = "refs/heads/simpl-fant-ghcjs";
sha256 = "1xwg9kkv91lyg021pry9i8a9imlad8h3ksylvlsn62wwkfynkzsz";
};
# ron-src = pkgs.fetchFromGitHub {
# owner = "ff-notes";
# repo = "ron";
# rev = "refs/heads/master";
# sha256 = "1drq383zjh789xrihpz2zlq49yd4j89x589xj0qwm99dhs33bzyd";
# };
# RON requires newer version, but does not work, breaks a lot of other packages.
# Solution: Add single file which requires RON of new version directly in RON.
# transformers-src = pkgs.fetchdarcs {
# url = "https://hub.darcs.net/ross/transformers";
# rev = "0.5.6.2";
# sha256 = "13sm5d1p7137ifvzra2hb01lp0sxy4vzwkc3c3s6izzri6bl6g1n";
# };
# Local git.
# Problem: Uses hpack for packaging which does not work with GHCJS (somehow it builds hpack for GHCJS?)
# Solution:
# - Checkout, build with stack `stack build`
# - This generates cabal files in 'hedn' and 'hedn-functor'.
# - Remove `package.yml` and `hedn/package.yml`.
# - Remote *.cabal from .gitignore.
# - Add *.cabal files.
# - Commit, add correct sha256 here.
hedn-src = pkgs.fetchgit {
url = "file:///Users/mputz/Projects/simpl-fant/workspace-hs/simpl-fant-test/reflex-obelisk-ron/libs/hedn";
rev = "refs/heads/simpl-fant-ghcjs";
sha256 = "09320xbavbc1nkfq8j69dwg6m333fsadmcqf5c3y6vhdk5spp7g8";
};
# hedn-src = pkgs.fetchFromGitLab {
# owner = "dpwiz";
# repo = "hedn";
# rev = "0.2.0.0";
# sha256 = "0mc3bir4i9ds88c78w90nxj2sbc1r87i79c0irykym7yihqap3ji";
# };
# # Missing dependency; apparently not in packages.
# # GHC 8.4 has only megaparsec <7 ; ron requires megaparsec >=7.
megaparsec-src = pkgs.fetchFromGitHub {
owner= "mrkkrp";
repo= "megaparsec";
rev = "7.0.4";
sha256 = "0a9g6gpc8m9qrvldwn4chs0yqnr4dps93achg1df72lxknrpp0iy";
};
# Forced to be up-to-date due to ron requiring megaparsec >=7 (assumption).
neat-interpolation-src = pkgs.fetchFromGitHub {
owner= "nikita-volkov";
repo= "neat-interpolation";
rev = "0.3.2.4";
sha256 = "03cwaimnl6fp9m2pq65rharsg88bmpkzbf1wmbx17wf07mjqr2a5";
};
# Forced to be up-to-date due to ron requiring megaparsec >7 (assumption).
modern-ui-src = pkgs.fetchFromGitHub {
owner= "mrkkrp";
repo= "modern-uri";
rev = "0.3.0.1";
sha256 = "09bp9zip5784r8hr2q3y2padlsv3bxqfh2d5vvyixfd0bhw2rpkw";
};
in
{
# transformers = dontCheck (self.callCabal2nix "transformers" transformers-src {});
hedn = dontCheck (doJailbreak (self.callCabal2nix "hedn" (hedn-src + "/hedn") {}));
megaparsec = dontCheck (doJailbreak (self.callCabal2nix "megaparsec" megaparsec-src {}));
hspec-megaparsec = dontCheck (doJailbreak (super.hspec-megaparsec));
modern-uri = dontCheck (doJailbreak (self.callCabal2nix "modern-uri" modern-ui-src {}));
silently = dontCheck (super.silently);
ron-storage = self.callCabal2nix "ron-storage" (ron-src + "/ron-storage") {};
ron-schema = self.callCabal2nix "ron-schema" (ron-src + "/ron-schema") {};
ron-rdt = self.callCabal2nix "ron-rdt" (ron-src + "/ron-rdt") {};
ron = dontCheck (self.callCabal2nix "ron" (ron-src + "/ron") {});
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment