From de026c185e1603b58c9d1da57606ba6789547309 Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Fri, 22 Mar 2019 15:19:32 -0400 Subject: [PATCH] Try to integrate hnix-store-core into hnix-store ghcjs build --- ghcjs/default.nix | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ghcjs/default.nix b/ghcjs/default.nix index be86fb3..8c1b119 100644 --- a/ghcjs/default.nix +++ b/ghcjs/default.nix @@ -2,17 +2,16 @@ let rp = builtins.fetchTarball "https://github.com/reflex-frp/reflex-platform/archive/${rpRef}.tar.gz"; -in - (import rp {}).project ({ pkgs, ... }: - with pkgs.haskell.lib; { - name = "hnix-ghcjs"; - overrides = self: super: + hnix-store-src = pkgs: pkgs.fetchFromGitHub { + owner = "haskell-nix"; + repo = "hnix-store"; + rev = "0.1.0.0"; + sha256 = "1z48msfkiys432rkd00fgimjgspp98dci11kgg3v8ddf4mk1s8g0"; + }; + + overlay = pkgs: with pkgs.haskell.lib; self: super: let guardGhcjs = p: if self.ghc.isGhcjs or false then null else p; in { - cryptohash-md5 = guardGhcjs super.cryptohash-md5; - cryptohash-sha1 = guardGhcjs super.cryptohash-sha1; - cryptohash-sha256 = guardGhcjs super.cryptohash-sha256; - cryptohash-sha512 = guardGhcjs super.cryptohash-sha512; hashing = super.hashing; haskeline = guardGhcjs super.haskeline; serialise = doJailbreak super.serialise; @@ -59,6 +58,15 @@ in sha256 = "128q8k4py2wr1v0gmyvqvzikk6sksl9aqj0lxzf46763lis8x9my"; }) {}; }; +in + (import rp {}).project ({ pkgs, ... }: + { + name = "hnix-ghcjs"; + overrides = pkgs.lib.foldr pkgs.lib.composeExtensions (_: _: {}) + [ + (import "${hnix-store-src pkgs}/overlay.nix") + (overlay pkgs) + ]; packages = { hnix = ../.; };