From ff83aca51139a21a2dc6a2c20a25a0fad12358f6 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Sun, 15 Jul 2018 22:53:54 -0400 Subject: [PATCH] Added ghcjs-base to GHCJS 8.4 / 8.2 --- pkgs/development/compilers/ghcjs-ng/README.md | 1 + .../compilers/ghcjs-ng/default.nix | 7 ++++- .../compilers/ghcjs-ng/ghcjs-base.nix | 29 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix diff --git a/pkgs/development/compilers/ghcjs-ng/README.md b/pkgs/development/compilers/ghcjs-ng/README.md index b75e4331651f..6292f0cd4d23 100644 --- a/pkgs/development/compilers/ghcjs-ng/README.md +++ b/pkgs/development/compilers/ghcjs-ng/README.md @@ -16,5 +16,6 @@ $ nix-prefetch-git https://github.com/ghcjs/ghcjs --rev refs/heads/ghc-8.4 \ | jq '{ url, rev, fetchSubmodules, sha256 }' \ > 8.4/git.json $ cat $(nix-build ../../../.. -A haskell.compiler.ghcjs82.genStage0 --no-out-link) > 8.4/stage0.nix +$ cabal2nix git://github.com/ghcjs/ghcjs-base > ghcjs-base.nix ``` diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix index 9aa3efe614eb..ddabb7ca6bfc 100644 --- a/pkgs/development/compilers/ghcjs-ng/default.nix +++ b/pkgs/development/compilers/ghcjs-ng/default.nix @@ -18,6 +18,7 @@ , lib , nodePackages , ghcjsDepOverrides ? (_:_:{}) +, haskell }: let @@ -48,7 +49,11 @@ let # Relics of the old GHCJS build system stage1Packages = []; - mkStage2 = _: {}; + mkStage2 = { callPackage }: { + # https://github.com/ghcjs/ghcjs-base/issues/110 + # https://github.com/ghcjs/ghcjs-base/pull/111 + ghcjs-base = haskell.lib.dontCheck (haskell.lib.doJailbreak (callPackage ./ghcjs-base.nix {})); + }; haskellCompilerName = "ghcjs-${bootGhcjs.version}"; }; diff --git a/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix b/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix new file mode 100644 index 000000000000..d03843aa336a --- /dev/null +++ b/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix @@ -0,0 +1,29 @@ +{ mkDerivation, aeson, array, attoparsec, base, binary, bytestring +, containers, deepseq, directory, dlist, fetchgit, ghc-prim +, ghcjs-prim, hashable, HUnit, integer-gmp, primitive, QuickCheck +, quickcheck-unicode, random, scientific, stdenv, test-framework +, test-framework-hunit, test-framework-quickcheck2, text, time +, transformers, unordered-containers, vector +}: +mkDerivation { + pname = "ghcjs-base"; + version = "0.2.0.0"; + src = fetchgit { + url = "git://github.com/ghcjs/ghcjs-base"; + sha256 = "0qr05m0djll3x38dhl85pl798arsndmwfhil8yklhb70lxrbvfrs"; + rev = "01014ade3f8f5ae677df192d7c2a208bd795b96c"; + }; + libraryHaskellDepends = [ + aeson attoparsec base binary bytestring containers deepseq dlist + ghc-prim ghcjs-prim hashable integer-gmp primitive scientific text + time transformers unordered-containers vector + ]; + testHaskellDepends = [ + array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit + primitive QuickCheck quickcheck-unicode random test-framework + test-framework-hunit test-framework-quickcheck2 text + ]; + homepage = "http://github.com/ghcjs/ghcjs-base"; + description = "base library for GHCJS"; + license = stdenv.lib.licenses.mit; +}