WIP ghcjs

This commit is contained in:
Mats Rauhala 2018-12-19 00:24:11 +02:00
parent 6455d51d0e
commit 2eb5304977
4 changed files with 63 additions and 37 deletions

View File

@ -10,8 +10,8 @@ let
miso = nixpkgs.fetchFromGitHub {
owner = "dmjio";
repo = "miso";
rev = "a9c4f0a3a6e7d87f9432dc6cf4b1d0c052bf7ef1";
sha256 = "1yq5y4vffslm6abnfnggp5m3k6vla6mzcwmhmm23l8yizsvdkwv2";
rev = "630e823dd40a434b73124e12b229a79d9fefb01d";
sha256 = "046gdp3ah2lsipfcy89rh20mn08xbhcgrj549v8zzy69j33xjm2l";
};
miso-jsaddle = super: if haskellPackages.ghc.isGhcjs or false then (super.callPackage (miso + "/miso-ghcjs.nix") {}) else (super.callPackage (miso + "/miso-ghc-jsaddle.nix") {});
@ -31,37 +31,37 @@ in
jsaddle-warp = nixpkgs.haskell.lib.dontCheck (super.callPackage (jsaddle + "/jsaddle-warp") {});
jsaddle = super.callPackage (jsaddle + "/jsaddle") {};
miso = miso-jsaddle super;
doctest = null; # Not compilable with ghcjs
comonad = dontCheck super.comonad;
Glob = dontCheck super.Glob;
SHA = dontCheck super.SHA;
iproute = dontCheck super.iproute;
semigroupoids = dontCheck super.semigroupoids;
wai-app-static = dontCheck super.wai-app-static;
attoparsec = dontCheck super.attoparsec;
http-date = dontCheck super.http-date;
lens = dontCheck super.lens;
unix-time = dontCheck super.unix-time;
http-types = dontCheck super.http-types;
servant = dontCheck super.servant;
servant-server = dontCheck super.servant-server;
servant-auth-docs = dontCheck super.servant-auth-docs;
lens-aeson = dontCheck super.lens-aeson;
word8 = dontCheck super.word8;
http2 = dontCheck super.http2;
wai-extra = dontCheck super.wai-extra;
pgp-wordlist = dontCheck super.pgp-wordlist;
prettyprinter = dontCheck super.prettyprinter;
unliftio = dontCheck super.unliftio;
prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
distributive = dontCheck super.distributive;
genvalidity-property = dontCheck super.genvalidity-property;
genvalidity-hspec = dontCheck super.genvalidity-hspec;
genvalidity = dontCheck super.genvalidity;
megaparsec = dontCheck super.megaparsec;
ncurses = null;
haskeline = super.callHackage "haskeline" "0.7.4.2" {};
terminfo = super.callHackage "terminfo" "0.4.1.1" {};
# doctest = null; # Not compilable with ghcjs
# comonad = dontCheck super.comonad;
# Glob = dontCheck super.Glob;
# SHA = dontCheck super.SHA;
# iproute = dontCheck super.iproute;
# semigroupoids = dontCheck super.semigroupoids;
# wai-app-static = dontCheck super.wai-app-static;
# attoparsec = dontCheck super.attoparsec;
# http-date = dontCheck super.http-date;
# lens = dontCheck super.lens;
# unix-time = dontCheck super.unix-time;
# http-types = dontCheck super.http-types;
# servant = dontCheck super.servant;
# servant-server = dontCheck super.servant-server;
# servant-auth-docs = dontCheck super.servant-auth-docs;
# lens-aeson = dontCheck super.lens-aeson;
# word8 = dontCheck super.word8;
# http2 = dontCheck super.http2;
# wai-extra = dontCheck super.wai-extra;
# pgp-wordlist = dontCheck super.pgp-wordlist;
# prettyprinter = dontCheck super.prettyprinter;
# unliftio = dontCheck super.unliftio;
# prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
# distributive = dontCheck super.distributive;
# genvalidity-property = dontCheck super.genvalidity-property;
# genvalidity-hspec = dontCheck super.genvalidity-hspec;
# genvalidity = dontCheck super.genvalidity;
# megaparsec = dontCheck super.megaparsec;
# ncurses = null;
# haskeline = super.callHackage "haskeline" "0.7.4.2" {};
# terminfo = super.callHackage "terminfo" "0.4.1.1" {};
};
tools = with haskellPackages; [
ghcid

View File

@ -20,7 +20,6 @@ executable frontend
-- other-modules:
-- other-extensions:
build-depends: base >=4.11 && <4.12
, common
, miso
, jsaddle-warp
, mtl

View File

@ -1,7 +1,7 @@
{
"url": "https://github.com/nixos/nixpkgs.git",
"rev": "e0d250e5cf6d179e1ccc775472d89718f61fcfd1",
"rev": "4507926b80c6b8f73053775ffee17f6781c7e7c8",
"date": "2018-01-08T11:52:28+01:00",
"sha256": "1iqpjz4czcpghbv924a5h4jvfmj6c8q6sl3b1z7blz3mi740aivs",
"sha256": "068v9xh7d8klk62p2qwr76fyfqfh1bp08xc12x138g5q6pg6yfzb",
"fetchSubmodules": true
}

View File

@ -2,12 +2,39 @@
let
config = {
packageOverrides = pkgs: with pkgs.haskell.lib; with pkgs.lib; {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
ghcjs84 = pkgs.haskell.packages.ghcjs84.override {
overrides = self: super: {
doctest = null;
directory-tree = dontCheck (super.directory-tree);
http-types = dontCheck (super.http-types);
tasty-quickcheck = dontCheck (super.tasty-quickcheck);
scientific = dontCheck (super.scientific);
servant = dontCheck (super.servant);
jsaddle-warp = super.callPackage ./jsaddle-warp-ghcjs.nix {};
ghc = overrideDerivation (super.ghc.override {
ghcjsSrc = pkgs.fetchgit {
url = "https://github.com/ghcjs/ghcjs.git";
rev = "dc190b1bb2453cfa484124e9f335ee3cad1492f7";
sha256 = "0dh52aj0f3700zfyrhisy44b6y9p1bsawwrmd5pllpdyw21zd9lw";
fetchSubmodules = true;
};
}) (drv: { patches = (drv.patches or []) ++ [ ./ghcjs.patch ]; });
};
};
};
};
};
};
pinnedVersion = nixpkgs.lib.importJSON ./nixpkgs-version.json;
pinnedPkgs = import (nixpkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
inherit (pinnedVersion) rev sha256;
}) {};
}) { inherit config; };
inherit (pinnedPkgs) pkgs;
in