Created
April 12, 2020 21:40
-
-
Save Tehnix/162428ed437385343c99a54181e04046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
bootPkgs = import <nixpkgs> { }; | |
ghcide-pkgs = import (builtins.fetchTarball | |
"https://github.com/hercules-ci/ghcide-nix/tarball/master") { }; | |
# We use a patched fork of base-noprelude which is compatible with GHCJS. | |
base-noprelude-src = bootPkgs.fetchFromGitHub { | |
owner = "codetalkio"; | |
repo = "base-noprelude"; | |
rev = "00b9f86b788d5e3558846b292a6bf6b25816647b"; | |
sha256 = "0ziqdg5n4fg83wykbbdhbmki5mksyzaxvw3bma2qain9hz5bran6"; | |
}; | |
overlay = self: pkgs: | |
with pkgs.haskell.lib; { | |
haskell = pkgs.haskell // { | |
packages = pkgs.haskell.packages // { | |
ghcjs86 = pkgs.haskell.packages.ghcjs86.override { | |
overrides = selfPkgs: superPkgs: { }; | |
}; | |
}; | |
}; | |
}; | |
miso-pkgs = import (builtins.fetchTarball | |
"https://github.com/dmjio/miso/archive/5d7f377e3f8baf10ef259a6baf267a5705ebd175.tar.gz") { | |
overlays = [ overlay ]; | |
}; | |
in { | |
# Inherit allows us to use the `miso-pkgs` and `ghcide-pkgs` variable from another lexical scope. | |
inherit bootPkgs; | |
inherit miso-pkgs; | |
inherit ghcide-pkgs; | |
# Our dev package set configures our Miso project with JSAddle and regular GHC. | |
dev = miso-pkgs.pkgs.haskell.packages.ghc865.callCabal2nix "miso-spa" ./. { | |
miso = miso-pkgs.miso-jsaddle; | |
}; | |
# Our release package set configures our Miso project with GHCJS. | |
release = | |
miso-pkgs.pkgs.haskell.packages.ghcjs86.callCabal2nix "miso-spa" ./. { }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment