diff --git a/ChangeLog.md b/ChangeLog.md index 8acc16db2..94023d51c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,16 @@ This project's release branch is `master`. This log is written from the perspective of the release branch: when changes hit `master`, they are considered released. +## v1.2.0.0 + +* Add support for aarch64-darwin (apple silicon macs) and aarch64-linux. See [docs/platform-support.md](./docs/platform-support.md) for more information about what's supported and what isn't on each platform. +* nixpkgs updated to 22.11 +* *Breaking change*: Disable webkit2gtk backend for reflex-dom by default. To enable it, use the useWebkit2Gtk flag in `default.nix`. +* *Breaking change*: Remove deprecated cabal2nixResult +* Haskell Libraries Updates + * reflex-dom 0.6.3.1 +* ios: Update ios-deploy to v1.12.2 + ## v1.1.2.0 - 2023-09-07 * Haskell Libraries Updated diff --git a/android/impl.nix b/android/impl.nix index 44ca619b9..6dc774ace 100644 --- a/android/impl.nix +++ b/android/impl.nix @@ -1,9 +1,23 @@ env: with env; let overrideAndroidCabal = package: overrideCabal package (drv: { - preConfigure = (drv.preConfigure or "") + '' - sed -i 's%^executable *\(.*\)$%executable lib\1.so\n cc-options: -shared -fPIC\n ld-options: -shared -Wl,--gc-sections,--version-script=${./haskellActivity.version},-u,Java_systems_obsidian_HaskellActivity_haskellStartMain,-u,hs_main\n ghc-options: -shared -fPIC -threaded -no-hs-main -lHSrts_thr -lffi -lm -llog%i' *.cabal + # -Wl,--unresolved-symbols=ignore-in-object-files + preConfigure = (drv.preConfigure or "") + '' + export NIX_CFLAGS_LINK="-no-pie -v" + sed -i 's%^executable *\(.*\)$%executable lib\1.so\n cc-options: -no-pie -shared -fPIC\n ld-options: -no-pie -shared -Wl,--gc-sections,--version-script=${./haskellActivity.version},-u,Java_systems_obsidian_HaskellActivity_haskellStartMain,-u,hs_main\n ghc-options: -fPIC -shared -no-pie -threaded -no-hs-main -lHSrts_thr -lffi -lm -llog%i' *.cabal ''; - }); + # -no-hs-main + configureFlags = (drv.configureFlags or []) ++ [ + "--enable-shared" + ]; + }); + /* + overrideAndroidCabal = package: overrideCabal package (drv: { + preConfigure = '' + export NIX_CFLAGS_COMPILE="" + export NIX_CFLAGS_LINK="-v -no-pie" + ''; + }); + */ androidenv = nixpkgs.androidenv; #TODO: Keep the signing key for dev mode more consistent, e.g. in ~/.config/reflex-platform, so that the app can be reinstalled in-place addDeployScript = src: nixpkgs.runCommand "android-app" { @@ -14,16 +28,20 @@ let overrideAndroidCabal = package: overrideCabal package (drv: { substitute ${./deploy.sh} $out/bin/deploy \ --subst-var-by coreutils ${nixpkgs.coreutils} \ --subst-var-by adb ${androidenv.androidPkgs_9_0.platform-tools} \ - --subst-var-by java ${nixpkgs.openjdk11} \ + --subst-var-by java ${nixpkgs.openjdk17_headless} \ --subst-var-by out $out chmod +x "$out/bin/deploy" ''; buildInputs = [ androidenv.androidPkgs_9_0.androidsdk ]; } ""; buildGradleApp = import ./build-gradle-app.nix { - inherit (nixpkgs) stdenv lib jdk gnumake gawk file runCommand - which gradle fetchurl buildEnv; + inherit (nixpkgs) stdenv lib gnumake gawk file runCommand + which fetchurl buildEnv; inherit androidenv; + gradle = nixpkgs.gradle.override { + java = nixpkgs.buildPackages.openjdk11_headless; + }; + jdk = nixpkgs.buildPackages.openjdk17_headless; }; inherit (nixpkgs.lib) splitString escapeShellArg mapAttrs attrNames concatStrings optionalString; in { diff --git a/default.nix b/default.nix index 5eacf4b15..075e77245 100644 --- a/default.nix +++ b/default.nix @@ -7,6 +7,7 @@ , useFastWeak ? true , useReflexOptimizer ? false , useTextJSString ? true # Use an implementation of "Data.Text" that uses the more performant "Data.JSString" from ghcjs-base under the hood. +, useWebkit2Gtk ? false # Enable webkit2gtk to build reflex-dom desktop apps , __useTemplateHaskell ? true # Deprecated, just here until we remove feature from reflex and stop CIing it , __useNewerCompiler ? true , iosSdkVersion ? "16.1" @@ -19,6 +20,7 @@ let iosSupport = system == "x86_64-darwin"; androidSupport = lib.elem system [ "x86_64-linux" ]; + ghc86Support = lib.elem system ["x86_64-linux" "x86_64-darwin"]; xcodeVer = { "16.1" = "14.1"; @@ -49,13 +51,19 @@ let iosSupport = system == "x86_64-darwin"; bootPkgs = super.haskell.packages.ghc865Binary // { happy = super.haskell.packages.ghc865Binary.happy_1_19_12; }; + useLdGold = !(self.stdenv.targetPlatform.isAarch32) && self.stdenv.hostPlatform.useAndroidPrebuilt; + enableDocs = false; + enableHaddockProgram = false; }; ghcSplices-8_10 = (super.haskell.compiler.ghc8107.override { # New option for GHC 8.10. Explicitly enable profiling builds enableProfiledLibs = true; - bootPkgs = super.haskell.packages.ghc865Binary // { - happy = super.haskell.packages.ghc865Binary.happy_1_19_12; - }; + #enableShared = self.stdenv.hostPlatform == self.stdenv.targetPlatform; + #enableShared = false; + bootPkgs = if (super.stdenv.hostPlatform.isAarch64) then (super.haskell.packages.ghc8107Binary // { + happy = super.haskell.packages.ghc8107Binary.happy_1_19_12; + }) else + (super.haskell.packages.ghc865Binary // { happy = super.haskell.packages.ghc865Binary.happy_1_19_12; }); }).overrideAttrs (drv: { src = nixpkgs.hackGet ./haskell-overlays/splices-load-save/dep/ghc-8.10; # When building from the ghc git repo, ./boot must be run before configuring, whereas @@ -94,7 +102,8 @@ let iosSupport = system == "x86_64-darwin"; useFastWeak useReflexOptimizer enableLibraryProfiling enableTraceReflexEvents useTextJSString enableExposeAllUnfoldings __useTemplateHaskell haskellOverlaysPre - haskellOverlaysPost; + haskellOverlaysPost + useWebkit2Gtk; inherit ghcSavedSplices-8_6 ghcSavedSplices-8_10; }; }; @@ -105,13 +114,13 @@ let iosSupport = system == "x86_64-darwin"; libiconv = super.darwin.libiconv.overrideAttrs (_: lib.optionalAttrs (self.stdenv.hostPlatform != self.stdenv.buildPlatform) { postInstall = "rm $out/include/libcharset.h $out/include/localcharset.h"; - configureFlags = ["--disable-shared" "--enable-static"]; + configureFlags = ["--enable-shared" "--enable-static"]; }); - }; + }; zlib = super.zlib.override (lib.optionalAttrs (self.stdenv.hostPlatform != self.stdenv.buildPlatform) - { static = true; shared = false; }); - }; + { static = true; shared = true; }); + }; mobileGhcOverlay = import ./nixpkgs-overlays/mobile-ghc { inherit lib; }; @@ -120,6 +129,7 @@ let iosSupport = system == "x86_64-darwin"; nixpkgsArgs = { inherit system; overlays = [ + (import ./nixpkgs-overlays/ghc.nix { inherit lib; }) hackGetOverlay bindHaskellOverlays forceStaticLibs @@ -127,26 +137,45 @@ let iosSupport = system == "x86_64-darwin"; mobileGhcOverlay allCabalHashesOverlay (self: super: { - binutils-unwrapped = super.binutils-unwrapped.override { - autoreconfHook = lib.optional self.stdenv.buildPlatform.isDarwin super.autoreconfHook269; + + runtimeShellPackage = if (self.stdenv.hostPlatform.isGhcjs || self.stdenv.targetPlatform.isiOS) + then super.buildPackages.runtimeShellPackage + else super.runtimeShellPackage; + + polkit = super.polkit.override { + gobject-introspection = super.gobject-introspection-unwrapped; }; - # Bump ios-deploy - # - for faster deployments - # - fixes debug deploy with iOS 16/macos 12.3/ xcode 13.4.1 - darwin = super.darwin // { - ios-deploy = super.darwin.ios-deploy.overrideAttrs (_: { - version = "HEAD"; + darwin = super.darwin.overrideScope (dself: dsuper: { + ios-deploy = dsuper.ios-deploy.overrideAttrs (_: { + version = "1.12.2"; src = self.fetchFromGitHub { owner = "ios-control"; repo = "ios-deploy"; - rev = "b3254438719b6bc82ceab1f630e7d642a9acfac5"; # unreleased - sha256 = "W45Qjr3xqvDWieLBgt4//nthxxcc3hgrJNrpSk7vWj8="; + rev = "ed7de7792d28a5110242748649047a95c95ea917"; + sha256 = "082w7j490khfpbv1diwrjixjbg9g93wdr2khyzdhv8xmzzwq4lad"; }; }); + }); + openjdk16-bootstrap = super.openjdk16-bootstrap.override { + gtkSupport = false; + }; + adoptopenjdk-hotspot-bin-16 = super.adoptopenjdk-hotspot-bin-16.override { + gtkSupport = false; }; + + sqlite = super.sqlite.overrideAttrs (old: lib.optionalAttrs (self.stdenv.hostPlatform.useAndroidPrebuilt or false) { + postBuild = '' + mkdir -p $debug + ''; + }); + + libiconv = super.libiconv.overrideAttrs (old: lib.optionalAttrs (self.stdenv.hostPlatform.useAndroidPrebuilt or false) { + configureFlags = [ "--disable-shared" "--enable-static" ]; + }); + + libffi = if (self.stdenv.hostPlatform.useAndroidPrebuilt or false) then super.libffi_3_3 else super.libffi; }) - (import ./nixpkgs-overlays/ghc.nix { inherit lib; }) ] ++ nixpkgsOverlays; config = config // { permittedInsecurePackages = (config.permittedInsecurePackages or []) ++ [ @@ -166,24 +195,41 @@ let iosSupport = system == "x86_64-darwin"; wasmCross = nixpkgs.hackGet ./wasm-cross; webGhcSrc = (import (wasmCross + /webghc.nix) { inherit fetchgit; }).ghc8107SplicesSrc; nixpkgsCross = { + # NOTE(Dylan Green): + # sdkVer 30 is the minimum for android, else we have to use libffi 3.3 + # bionic doesn't support/expose memfd_create before sdk30 + # https://android.googlesource.com/platform/bionic/+/refs/heads/master/docs/status.md + # Look for "new libc functions in R (API Level 30):", memfd_create will be one of the functions / + # symbols we need to build newer libffi + # This means we'll drop all SDKs pre-30 + + # NOTE(Dylan Green): + # We don't want to use "isStatic" here as we still rely on shared-objects + # adding "isStatic" completely disables generating most SOs, and we still need them + # for libffi (at the very least). Currently the big issues are caused by the linker attempting (and failing) + # to link against a dynamic crtbegin.o (crtbegin.c) bionic does provide a static crtbegin, although the linker + # defaults to a dynamic version + + # TODO(Dylan Green): + # Look into making this a proper static build up into "reflex-todomvc" android = lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec { aarch64 = { - crossSystem = lib.systems.examples.aarch64-android-prebuilt // - { isStatic = true; }; - sdkVer = "30"; + crossSystem = lib.systems.examples.aarch64-android-prebuilt // { + #isStatic = true; + sdkVer = "30"; + }; }; aarch32 = { crossSystem = lib.systems.examples.armv7a-android-prebuilt // { - isStatic = true; - # Choose an old version so it's easier to find phones to test on - sdkVer = "23"; + #isStatic = true; + sdkVer = "30"; }; }; }; ios = lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec { simulator64 = { crossSystem = lib.systems.examples.iphone64-simulator // { - #isStatic = true; + isStatic = true; sdkVer = iosSdkVersion; inherit xcodeVer; }; @@ -229,12 +275,6 @@ let iosSupport = system == "x86_64-darwin"; override = new: makeRecursivelyOverridable (x.override (old: (combineOverrides old new))); }; - cabal2nixResult = src: builtins.trace "cabal2nixResult is deprecated; use ghc.haskellSrc2nix or ghc.callCabal2nix instead" (ghc.haskellSrc2nix { - name = "for-unknown-package"; - src = "file://${src}"; - sha256 = null; - }); - ghcSavedSplices = if __useNewerCompiler then ghcSavedSplices-8_10 else ghcSavedSplices-8_6; ghcSavedSplices-8_6 = (makeRecursivelyOverridable nixpkgs.haskell.packages.integer-simple.ghcSplices-8_6).override { overrides = lib.foldr lib.composeExtensions (_: _: {}) (let @@ -269,8 +309,7 @@ let iosSupport = system == "x86_64-darwin"; ghcjs = if __useNewerCompiler then ghcjs8_10 else ghcjs8_6; ghcjs8_6 = (makeRecursivelyOverridable (nixpkgsCross.ghcjs.haskell.packages.ghcjs86.override (old: { ghc = old.ghc.override { - bootPkgs = with nixpkgsCross.ghcjs.buildPackages.haskell.packages; - ghc865 // { happy = ghc865.callHackage "happy" "1.19.9" {}; }; + bootPkgs = old.ghc.bootPkgs // { happy = old.ghc.bootPkgs.happy_1_19_12; }; cabal-install = import ./haskell-overlays/ghcjs-8.6/cabal-install.nix { inherit nixpkgs; }; ghcjsSrc = import ./haskell-overlays/ghcjs-8.6/src.nix { inherit (nixpkgs.stdenvNoCC) mkDerivation; @@ -514,7 +553,6 @@ in let this = rec { cabal-install ghcid hasktags - hlint stylish-haskell # Recent stylish-haskell only builds with AMP in place reflex-ghci ; @@ -589,7 +627,7 @@ in let this = rec { iosReflexTodomvc iosSimulatorReflexTodomvc ]; - inherit cabal2nixResult system androidSupport iosSupport; + inherit system androidSupport iosSupport ghc86Support; project = args: import ./project this (args ({ pkgs = nixpkgs; } // this)); tryReflexShell = pinBuildInputs ("shell-" + system) tryReflexPackages; ghcjsExternsJs = ./ghcjs.externs.js; diff --git a/docs/platform-support.md b/docs/platform-support.md new file mode 100644 index 000000000..fd5f483c2 --- /dev/null +++ b/docs/platform-support.md @@ -0,0 +1,23 @@ +# Supported Platforms + +reflex-platform supports building *on* x86_64 and aarch64 linux and macOS systems. It supports building *for* Android, iOS, Javascript, Linux, and macOS targets. + +Depending on the build system you are using, you can build for the following targets: + +| | Javascript | Android | iOS | Linux x86_64 | Linux aarch64 | macOS (intel) | macOS (m1/m2) | +|---------------|------------|---------|-----|--------------|---------------|---------------|---------------| +| Linux x86_64 | ✅ | ✅ | | ✅ | | | | +| Linux aarch64 | ✅ | | | | ✅ | | | +| macOS (intel) | ✅ | | ✅ | | | ✅ | | +| macOS (m1/m2) | ✅ | | | | | | ✅ | + +* On aarch64 platforms (aarch64-linux and aarch64-darwin), we do not support ghc-8.6.5 or ghcjs-8.6.5. +* From Linux, you can't build for iOS or macOS because the apple toolchain is restricted to macOS. +* Android builds aren't yet supported from macOS. +* When building a desktop app on x86_64-linux you can use webkitgtk, but that isn't yet supported on aarch64-linux. You can, however, build your backend executable and warp-based frontend executables on either architecture. +* When building a desktop app on macOS you can use wkwebview or warp. +* 32-bit android builds are only supported via ghc-8.6.5 because later versions of ghc don't support that platform. + +## Binary Caches + +Binary caches are provided for x86_64-linux, x86_64-darwin, and aarch64-darwin. We will be adding an aarch64-linux cache in the future. diff --git a/docs/project-development.rst b/docs/project-development.rst index b89051686..569cb80a2 100644 --- a/docs/project-development.rst +++ b/docs/project-development.rst @@ -212,11 +212,12 @@ Building the frontend with GHC can drastically speed up build times, and enables you to test from GHCi for even faster reloads. JSaddle is a set of libraries that allows Reflex-DOM to swap out its -JavaScript backend easily. By default, Reflex-DOM’s ``mainWidget`` will -work on GHC out of the box, using the ``jsaddle-webkit2gtk`` backend. So -simply building your ``frontend`` package using GHC will produce a -working native program that renders DOM using WebKit. This is -recommended for native desktop releases. +JavaScript backend easily. By default, Reflex-DOM’s ``mainWidget`` will work on +GHC out of the box, using the default backend for your platform (e.g., +jsaddle-warp on linux, wkwebview on macOS). So simply building your +``frontend`` package using GHC will produce a working program that renders DOM. +To select the webkit2gtk backend for reflex-dom on linux, set the useWebkit2Gtk +flag to true in default.nix. Note that webkit2gtk only works on x86_64-linux. To build this with ``nix-build``: diff --git a/haskell-overlays/android/default.nix b/haskell-overlays/android/default.nix index 1ea56293a..e99b37901 100644 --- a/haskell-overlays/android/default.nix +++ b/haskell-overlays/android/default.nix @@ -11,10 +11,29 @@ in self: super: { _dep = super._dep or {} // thunkSet ./dep; - android-activity = self.callPackage self._dep.android-activity { - inherit (nixpkgs.buildPackages) jdk; - }; - + android-activity = haskellLib.overrideCabal (self.callCabal2nix "android-activity" (self._dep.android-activity + "/") { + log = nixpkgs.androidndkPkgs_24.libraries; + }) (drv: let + jdk-fixed = (nixpkgs.buildPackages.jdk17.override { + headless = true; + enableGnome2 = false; + enableJavaFX = false; + openjdk17-bootstrap = nixpkgs.buildPackages.openjdk17-bootstrap.override { + gtkSupport = false; + }; + }); + in { + librarySystemDepends = (drv.librarySystemDepends or []) ++ [ jdk-fixed ]; + enableSharedExecutables = true; + enableSharedLibraries = true; + enableStaticLibraries = false; + buildTools = (drv.buildTools or []) ++ [ ]; + configureFlags = (drv.configureFlags or []) ++ [ + "--enable-shared" + #"-v3" + ]; + }); + syb = haskellLib.overrideCabal super.syb (drv: { jailbreak = true; }); cabal-doctest = null; @@ -22,9 +41,15 @@ self: super: { lifted-async = haskellLib.doJailbreak super.lifted-async; safe-exceptions = haskellLib.doJailbreak super.safe-exceptions; + blaze-textual = haskellLib.enableCabalFlag super.blaze-textual "integer-simple"; cryptonite = haskellLib.disableCabalFlag super.cryptonite "integer-gmp"; - + + OneTuple = haskellLib.overrideCabal super.OneTuple (drv: { + libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ + self.hashable + ]; + }); hashable = enableFPic super.hashable; primitive = enableFPic super.primitive; @@ -34,6 +59,15 @@ self: super: { enableSharedExecutables = false; }); + # HACK(Dylan Green): + # Temporary fix for RPATH troubles regarding attoparsec + attoparsec = haskellLib.overrideCabal super.attoparsec (drv: { + preFixup = '' + rm -rf "$(pwd)" + mkdir "$(pwd)" + ''; + }); + # HACK(matthewbauer): # Temporary fix for https://github.com/ekmett/free/issues/176 # Optimizations are broken on some ARM-based systems for some reason. diff --git a/haskell-overlays/any-8.6.nix b/haskell-overlays/any-8.6.nix index 1833ca6dd..51ffa51de 100644 --- a/haskell-overlays/any-8.6.nix +++ b/haskell-overlays/any-8.6.nix @@ -1,28 +1,56 @@ { pkgs, haskellLib, fetchFromGitHub }: with haskellLib; +let + nixpkgs = (import ../nixpkgs/thunk.nix); +in self: super: { + inherit nixpkgs; cabal-macosx = dontCheck super.cabal-macosx; haddock-library-ghcjs = dontCheck super.haddock-library-ghcjs; haddock-api-ghcjs = dontCheck super.haddock-api-ghcjs; - ghc-lib-parser = self.callHackage "ghc-lib-parser" "8.10.2.20200808" {}; + # ghc-lib-parser = self.callHackage "ghc-lib-parser" "8.10.2.20200808" {}; http-date = dontCheck super.http-date; + Cabal-syntax = super.Cabal-syntax.override { + Cabal = super.Cabal_3_2_1_0; + }; + colour = haskellLib.overrideCabal (self.callHackage "colour" "2.3.5" { }) (drv: { + doCheck = false; + testHaskellDepends = [ ]; + }); + c2hs = self.callHackage "c2hs" "0.28.7" { }; + gtk2hs-buildtools = overrideCabal (self.callHackage "gtk2hs-buildtools" "0.13.8.3" { }) (drv: { + preConfigure = '' + sed -i 's|cabal-version: 3.0|cabal-version: 2.0|g' *.cabal + ''; + }); + webkit2gtk3-javascriptcore = overrideCabal + (self.callHackageDirect + { + pkg = "webkit2gtk3-javascriptcore"; + ver = "0.14.4.4"; + sha256 = "sha256-ZiM2pMigNJZPOxV6zAAjVdCAjg31k2T3oDyZsudkMfg="; + } + { }) + (drv: { + libraryPkgconfigDepends = [ pkgs.webkitgtk ]; + }); resolv = haskellLib.doJailbreak (super.resolv.override { base16-bytestring = super.base16-bytestring_0_1_1_7; }); - cabal2nix = super.cabal2nix.override { - distribution-nixpkgs = self.distribution-nixpkgs-8_6; - }; - distribution-nixpkgs-8_6 = super.distribution-nixpkgs_1_6_0.override { - Cabal = super.Cabal_3_2_1_0; + cabal2nix = super.cabal2nix.override { }; + distribution-nixpkgs_1_6_0 = self.callHackage "distribution-nixpkgs" "1.6.0" { }; + distribution-nixpkgs-8_6 = self.distribution-nixpkgs_1_6_0.override { + Cabal = super.Cabal_3_2_1_0; }; reflex-dom-core = haskellLib.dontCheck (super.reflex-dom-core); - cabal-install = (self.callHackage "cabal-install" "2.4.1.0" {}).override { + cabal-install = haskellLib.doJailbreak ((self.callHackage "cabal-install" "2.4.1.0" { }).override { Cabal = self.Cabal_2_4_1_0; base16-bytestring = self.base16-bytestring_0_1_1_7; + #random = self.callHackage "random" "1.1" {}; hackage-security = haskellLib.dontCheck (haskellLib.doJailbreak - ((self.callHackage "hackage-security" "0.5.3.0" {}).override { + ((self.callHackage "hackage-security" "0.5.3.0" { }).override { base16-bytestring = self.base16-bytestring_0_1_1_7; Cabal = self.Cabal_2_4_1_0; })); - }; + }); } diff --git a/haskell-overlays/default.nix b/haskell-overlays/default.nix index 4c667ec10..087c50fd5 100644 --- a/haskell-overlays/default.nix +++ b/haskell-overlays/default.nix @@ -6,6 +6,7 @@ , enableLibraryProfiling , enableTraceReflexEvents , useTextJSString +, useWebkit2Gtk , enableExposeAllUnfoldings , __useTemplateHaskell , ghcSavedSplices-8_6 @@ -50,6 +51,10 @@ rec { (optionalExtension enableExposeAllUnfoldings exposeAllUnfoldings) + #(NEW;Dylan Green): + # We no longer need to set gold as "lld" is default on the + # android toolchain now + #(OLD;Dylan Green): # Force "gold" on Android due to a linker bug on bfd # Also force -fPIC on for Android, we need it either way @@ -58,23 +63,28 @@ rec { # arm* needs the same linker options, x86* -> arm* does not (optionalExtension (super.ghc.stdenv.targetPlatform.isAndroid or false) (self: super: - { + { mkDerivation = drv: super.mkDerivation (drv // { buildFlags = [ - "--ghc-option=-optl-fuse-ld=gold" - "--ld-option=-fuse-ld=gold" "--ld-option=-fPIE" "--ld-option=-pie" "--ghc-option=-fPIC" "--ghc-option=-fPIE" ] ++ (drv.buildFlags or [ ]); - configureFlags = [ - "--with-ld=${super.ghc.stdenv.targetPlatform.config}-ld.gold" - ] ++ (drv.configureFlags or [ ]); + configureFlags = [ ] ++ (drv.configureFlags or [ ]); }); })) + # TODO(Dylan): Add this casing to the compiler patch + (optionalExtension (super.ghc.stdenv.targetPlatform.isiOS && (super.ghc.stdenv.targetPlatform.isx86_64 || super.ghc.version == "8.6.5")) (self: super: { + mkDerivation = drv: super.mkDerivation (drv // { + buildFlags = (drv.buildFlags or []) ++ [ + "--ghc-option=-fwhole-archive-hs-libs" + ]; + }); + })) + combined-any (optionalExtension (!(super.ghc.isGhcjs or false)) combined-ghc) (optionalExtension (super.ghc.isGhcjs or false) combined-ghcjs) @@ -139,6 +149,17 @@ rec { (optionalExtension useTextJSString textJSString-8_10) (optionalExtension useTextJSString ghcjs-textJSString-8_10) (optionalExtension useFastWeak ghcjs-fast-weak_8_10) + (self: super: rec { + mkDerivation = drv: super.mkDerivation (drv // { + setupHaskellDepends = (drv.setupHaskellDepends or []) ++ [ + nixpkgs.buildPackages.stdenv.cc + ]; + # This is ugly + preConfigure = (drv.preConfigure or "") + '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${nixpkgs.buildPackages.gmp}/lib:${nixpkgs.buildPackages.libffi}/lib + ''; + }); + }) ] self super; @@ -151,6 +172,7 @@ rec { inherit haskellLib lib nixpkgs thunkSet fetchFromGitHub fetchFromBitbucket hackGet useFastWeak useReflexOptimizer enableTraceReflexEvents enableLibraryProfiling __useTemplateHaskell + useWebkit2Gtk ; }; exposeAllUnfoldings = import ./expose-all-unfoldings.nix { }; diff --git a/haskell-overlays/ghcjs-8.6/cabal-install.nix b/haskell-overlays/ghcjs-8.6/cabal-install.nix index 7bc7869dd..4e21d8467 100644 --- a/haskell-overlays/ghcjs-8.6/cabal-install.nix +++ b/haskell-overlays/ghcjs-8.6/cabal-install.nix @@ -4,6 +4,7 @@ (self: super: { Cabal = self.Cabal_2_4_1_0; base16-bytestring = self.base16-bytestring_0_1_1_7; + random = self.callHackage "random" "1.1" {}; hackage-security = nixpkgs.haskell.lib.dontCheck (nixpkgs.haskell.lib.doJailbreak (self.callHackage "hackage-security" "0.5.3.0" {})); diff --git a/haskell-overlays/ghcjs-8.6/default.nix b/haskell-overlays/ghcjs-8.6/default.nix index a216ca36a..a6f27197e 100644 --- a/haskell-overlays/ghcjs-8.6/default.nix +++ b/haskell-overlays/ghcjs-8.6/default.nix @@ -6,7 +6,7 @@ with haskellLib; -self: super: { +self: super: rec { # Profiling failures seee https://github.com/ghcjs/ghcjs/issues/759 optparse-applicative = haskellLib.overrideCabal super.optparse-applicative (drv: { broken = drv.broken or false || enableLibraryProfiling; @@ -15,11 +15,11 @@ self: super: { broken = drv.broken or false || enableLibraryProfiling; }); - ghcWithPackages = selectFrom: nixpkgs.buildPackages.callPackage (nixpkgs.path + "/pkgs/development/haskell-modules/with-packages-wrapper.nix") { - inherit (self) ghc llvmPackages; - packages = selectFrom self; - } // nixpkgs.lib.optionalAttrs useReflexOptimizer { - ghcLibdir = "${self.ghc.bootPackages.ghcWithPackages (p: [ p.reflex ])}/lib/${self.ghc.bootPackages.ghc.name}"; + ghcWithPackages = nixpkgs.buildPackages.callPackage (nixpkgs.path + "/pkgs/development/haskell-modules/with-packages-wrapper.nix") { + haskellPackages = self; + hoogleWithPackages = super.hoogleWithPackages; + } // lib.optionalAttrs (useReflexOptimizer) { + ghcLibdir = lib.optionalString useReflexOptimizer "${self.ghc.bootPkgs.ghcWithPackages (p: [ p.reflex ])}/lib/${self.ghc.bootPkgs.ghc.name}"; }; ghc = if !(lib.versionAtLeast super.ghc.ghcVersion "8.2") then super.ghc else super.ghc.overrideAttrs (_: { @@ -47,6 +47,11 @@ self: super: { semigroupoids = disableCabalFlag super.semigroupoids "doctests"; these = dontCheck super.these; email-validate = dontCheck super.email-validate; + OneTuple = overrideCabal super.OneTuple (drv: { + libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ + self.hashable + ]; + }); # These tests are not expected to support ghcjs QuickCheck = dontCheck super.QuickCheck; diff --git a/haskell-overlays/profiling.nix b/haskell-overlays/profiling.nix index 8a555edf3..3422176cb 100644 --- a/haskell-overlays/profiling.nix +++ b/haskell-overlays/profiling.nix @@ -4,10 +4,14 @@ with haskellLib; +let + preventMobileProfiling = self: (!self.ghc.stdenv.targetPlatform.isiOS) && enableLibraryProfiling; +in + self: super: { # Override mkDerivation to inherit global settings mkDerivation = expr: super.mkDerivation (expr // { - inherit enableLibraryProfiling; + enableLibraryProfiling = preventMobileProfiling self; }); } diff --git a/haskell-overlays/reflex-packages/default.nix b/haskell-overlays/reflex-packages/default.nix index 130e00b8b..565c27470 100644 --- a/haskell-overlays/reflex-packages/default.nix +++ b/haskell-overlays/reflex-packages/default.nix @@ -2,6 +2,7 @@ , lib, nixpkgs , thunkSet, fetchFromGitHub, fetchFromBitbucket, hackGet , useFastWeak, useReflexOptimizer, enableTraceReflexEvents, enableLibraryProfiling, __useTemplateHaskell +, useWebkit2Gtk }: with haskellLib; @@ -17,6 +18,9 @@ let reflexOptimizerFlag = lib.optional (useReflexOptimizer && (self.ghc.cross or null) == null) "-fuse-reflex-optimizer"; useTemplateHaskellFlag = lib.optional (!__useTemplateHaskell) "-f-use-template-haskell"; + useWebkit2GtkFlag = if useWebkit2Gtk + then ["-fwebkit2gtk"] + else ["-f-webkit2gtk"] ++ lib.optional ((nixpkgs.stdenv.hostPlatform.isLinux or false) && !nixpkgs.stdenv.hostPlatform.useAndroidPrebuilt) "-fuse-warp"; # Enable warp on linux if webkit2gtk is disabled. Other platforms have other default runners inherit (nixpkgs) stdenv; # Older chromium for reflex-dom-core test suite @@ -46,7 +50,20 @@ in (lib.optional useFastWeak "-ffast-weak") ])) {}; - reflex-todomvc = self.callPackage self._dep.reflex-todomvc {}; + reflex-todomvc = + let + flags = + if useWebkit2Gtk && nixpkgs.stdenv.hostPlatform.isLinux + then [ "-f-warp" "-f-webkitgtk" "-f-wkwebview" ] + else if (nixpkgs.stdenv.hostPlatform.isLinux && !nixpkgs.stdenv.hostPlatform.useAndroidPrebuilt) + then [ "-fwarp" "-f-webkitgtk" "-f-wkwebview" "-f-webkit2gtk" ] + else if self.ghc.stdenv.targetPlatform.isiOS + then [ "-f-webkit2gtk" "-f-warp" "-f-webkitgtk" ] + else if nixpkgs.stdenv.hostPlatform.isDarwin + then [ "-fwkwebview" "-f-webkit2gtk" "-f-webkitgtk" ] + else []; + in + (haskellLib.doJailbreak (self.callCabal2nixWithOptions "reflex-todomvc" self._dep.reflex-todomvc (lib.concatStringsSep " " flags) {})); reflex-aeson-orphans = self.callCabal2nix "reflex-aeson-orphans" self._dep.reflex-aeson-orphans {}; # The tests for reflex-dom-core are not deterministic, disable them, and run them manually @@ -54,6 +71,7 @@ in inherit (self) ghc; noGcTest = stdenv.hostPlatform.system != "x86_64-linux" || stdenv.hostPlatform != stdenv.buildPlatform + || stdenv.targetPlatform.isiOS || (ghc.isGhcjs or false); in haskellLib.overrideCabal (self.callCabal2nixWithOptions "reflex-dom-core" (reflexDomRepo + "/reflex-dom-core") (lib.concatStringsSep " " (lib.concatLists [ @@ -96,11 +114,23 @@ in '' + (drv.preCheck or ""); }); - reflex-dom = - self.callCabal2nixWithOptions "reflex-dom" (reflexDomRepo + "/reflex-dom") (lib.concatStringsSep " " (lib.concatLists [ + reflex-dom = haskellLib.doJailbreak (haskellLib.overrideCabal (self.callCabal2nixWithOptions "reflex-dom" (reflexDomRepo + "/reflex-dom") (lib.concatStringsSep " " (lib.concatLists [ reflexOptimizerFlag useTemplateHaskellFlag - ])) {}; + useWebkit2GtkFlag + ])) { }) (drv: { + preConfigure = (drv.preConfigure or "") + '' + sed -i 's|aeson >=1.4 && <1.6|aeson -any|g' *.cabal + ''; + + libraryHaskellDepends = [ + self.reflex + self.reflex-dom-core + self.aeson + ] ++ lib.optional (nixpkgs.stdenv.hostPlatform.useAndroidPrebuilt or false) self.android-activity + ++ lib.optional (nixpkgs.stdenv.hostPlatform.isDarwin or false) self.jsaddle-wkwebview + ++ lib.optional ((nixpkgs.stdenv.hostPlatform.isLinux or false) && !nixpkgs.stdenv.hostPlatform.useAndroidPrebuilt) self.jsaddle-warp; + })); chrome-test-utils = self.callCabal2nix "chrome-test-utils" (reflexDomRepo + "/chrome-test-utils") {}; @@ -108,7 +138,7 @@ in ## Terminal / Conventional OS ## - reflex-vty = self.callCabal2nix "reflex-vty" self._dep.reflex-vty {}; + reflex-vty = haskellLib.doJailbreak (self.callCabal2nix "reflex-vty" self._dep.reflex-vty {}); reflex-process = self.callCabal2nix "reflex-process" self._dep.reflex-process {}; reflex-fsnotify = self.callCabal2nix "reflex-fsnotify" self._dep.reflex-fsnotify {}; @@ -144,7 +174,7 @@ in preConfigure = "substituteInPlace jsaddle-warp.cabal --replace 'aeson >=0.8.0.2 && <2.1' aeson"; }); - jsaddle-dom = self.callCabal2nix "jsaddle-dom" self._dep.jsaddle-dom {}; + jsaddle-dom = doJailbreak (self.callCabal2nix "jsaddle-dom" self._dep.jsaddle-dom {}); jsaddle-wasm = self.callCabal2nix "jsaddle-wasm" (hackGet (wasmCross + "/jsaddle-wasm")) {}; ghcjs-dom = self.callCabal2nix "ghcjs-dom" (self._dep.ghcjs-dom + "/ghcjs-dom") {}; ghcjs-dom-jsaddle = self.callCabal2nix "ghcjs-dom-jsaddle" (self._dep.ghcjs-dom + "/ghcjs-dom-jsaddle") {}; @@ -178,7 +208,7 @@ in commutative-semigroups = self.callCabal2nix "commutative-semigroups" self._dep.commutative-semigroups {}; witherable = self.callHackage "witherable" "0.4.2" {}; - webdriver = self.callHackage "webdriver" "0.9.0.1" {}; + webdriver = markUnbroken (self.callHackage "webdriver" "0.9.0.1" {}); # Not on Hackage yet # Version 1.2.1 not on Hackage yet diff --git a/haskell-overlays/reflex-packages/dep/reflex-dom/github.json b/haskell-overlays/reflex-packages/dep/reflex-dom/github.json index 355b6027c..277057b0d 100644 --- a/haskell-overlays/reflex-packages/dep/reflex-dom/github.json +++ b/haskell-overlays/reflex-packages/dep/reflex-dom/github.json @@ -1,8 +1,8 @@ { "owner": "reflex-frp", "repo": "reflex-dom", - "branch": "release/reflex-dom/0.6.3.0", + "branch": "release/reflex-dom/0.6.3.1", "private": false, - "rev": "39195afb34cf7d4f02df9d891ccadad9eebceb6c", - "sha256": "06yp8h94p9fqr4gkhj46vs56rvr446cdwmixi9pijyqzlnvp132j" + "rev": "5d1dbde4471d7f9be60977b972ab0219026ff5dc", + "sha256": "1kccc4cx6bxyr77m4dzqwrqb69ypwg3mbfiw728nykjrfkh8w72b" } diff --git a/haskell-overlays/reflex-packages/dep/reflex-todomvc/github.json b/haskell-overlays/reflex-packages/dep/reflex-todomvc/github.json index 10dd8e0ea..0b76f03e5 100644 --- a/haskell-overlays/reflex-packages/dep/reflex-todomvc/github.json +++ b/haskell-overlays/reflex-packages/dep/reflex-todomvc/github.json @@ -1,8 +1,8 @@ { "owner": "reflex-frp", "repo": "reflex-todomvc", - "branch": "delete-old-ios", + "branch": "nostdenvlib", "private": false, - "rev": "ee80289e264d97f7959826914f8fa8a3cd08289a", - "sha256": "1lh1gq1xpwp083n7nyxh6bfc82bwpw5gh072mhqyiiyg02l0h3hd" + "rev": "c1611b866b860976b33fccb3a5206b0e0866adb8", + "sha256": "18fk58nlin2d6ypzwb9k01iby5n3wm41w8glq2sn5nzjfkn8nyck" } diff --git a/haskell-overlays/reflex-packages/dep/reflex-todomvc/thunk.nix b/haskell-overlays/reflex-packages/dep/reflex-todomvc/thunk.nix index bbf2dc18f..20f2d28c2 100644 --- a/haskell-overlays/reflex-packages/dep/reflex-todomvc/thunk.nix +++ b/haskell-overlays/reflex-packages/dep/reflex-todomvc/thunk.nix @@ -2,7 +2,10 @@ let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: if !fetchSubmodules && !private then builtins.fetchTarball { url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; - } else (import {}).fetchFromGitHub { + } else (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; + sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; +}) {}).fetchFromGitHub { inherit owner repo rev sha256 fetchSubmodules private; }; json = builtins.fromJSON (builtins.readFile ./github.json); diff --git a/haskell-overlays/text-jsstring/default.nix b/haskell-overlays/text-jsstring/default.nix index 29444c2e6..747b40829 100644 --- a/haskell-overlays/text-jsstring/default.nix +++ b/haskell-overlays/text-jsstring/default.nix @@ -14,8 +14,8 @@ self: super: { ]; }); - aeson = doJailbreak (self.callCabal2nix "aeson" self._dep.aeson {}); - # attoparsec = dontCheck (self.callCabal2nix "attoparsec" self._dep.attoparsec {}); + aeson = dontCheck (self.callCabal2nix "aeson" self._dep.aeson {}); + attoparsec = dontCheck (self.callCabal2nix "attoparsec" self._dep.attoparsec {}); hashable = overrideCabal (self.callCabal2nix "hashable" self._dep.hashable {}) (drv: { revision = null; editedCabalFile = null; diff --git a/haskell-overlays/untriaged.nix b/haskell-overlays/untriaged.nix index c214ad02a..212967497 100644 --- a/haskell-overlays/untriaged.nix +++ b/haskell-overlays/untriaged.nix @@ -46,7 +46,6 @@ self: super: { self.callCabal2nix "hnix" (nixpkgs.hackGet ./hnix/hnix-store + "/hnix-store-core") {}; hnix-store-remote = self.callCabal2nix "hnix" (nixpkgs.hackGet ./hnix/hnix-store + "/hnix-store-remote") {}; - data-fix = self.callHackage "data-fix" "0.3.2" {}; neat-interpolation = self.callHackage "neat-interpolation" "0.4" {}; prettyprinter = self.callHackage "prettyprinter" "1.7.0" {}; cryptohash-sha512 = doJailbreak super.cryptohash-sha512; @@ -87,8 +86,11 @@ self: super: { http2 = self.callHackage "http2" "3.0.3" {}; HsYAML-aeson = self.callHackage "HsYAML-aeson" "0.2.0.1" {}; fsnotify = self.callHackage "fsnotify" "0.4.1.0" {}; - unliftio = self.callHackage "unliftio" "0.2.24.0" {}; + unliftio = dontCheck (self.callHackage "unliftio" "0.2.24.0" {}); sandwich = self.callHackage "sandwich" "0.1.0.6" {}; ghcid = self.callHackage "ghcid" "0.8.8" {}; postgresql-simple = self.callHackage "postgresql-simple" "0.6.5" {}; + ghc-lib-parser = super.ghc-lib-parser_8_10_7_20220219; + ghc-lib-parser-ex = super.ghc-lib-parser-ex_8_10_0_24; + stylish-haskell = doJailbreak (self.callHackage "stylish-haskell" "0.13.0.0" {}); # jailbreak to allow newer aeson } diff --git a/nixpkgs-overlays/ghc.nix b/nixpkgs-overlays/ghc.nix index 6816255ab..3d4aaaa21 100644 --- a/nixpkgs-overlays/ghc.nix +++ b/nixpkgs-overlays/ghc.nix @@ -1,7 +1,25 @@ { lib }: self: super: { + cabal2nix-unwrapped = self.haskell.packages.ghc8107.cabal2nix; + cabal-install = self.haskell.packages.ghc8107.cabal-install; # Apply custom patches to Haskell compilers haskell = super.haskell // { + compiler = super.haskell.compiler // { + ghc8107 = super.haskell.compiler.ghc8107.overrideAttrs (drv: { + patches = (drv.patches or []) ++ lib.optionals (self.stdenv.targetPlatform.isiOS || self.stdenv.targetPlatform.isAarch64 && self.stdenv.targetPlatform.isDarwin) [ + (super.fetchurl { + url = "https://raw.githubusercontent.com/reflex-frp/reflex-platform/mars/modules/patches/aarch64-darwin/fix_dead_strip.patch"; + sha256 = "sha256-1VcftxpaMmLzMnB8X4M6Xg9o+OmgpaNOeF7Yrn1x0EI="; + }) + ]; + }); + }; + packages = super.haskell.packages // { + ghc8107 = super.haskell.packages.ghc8107.override { + buildHaskellPackages = self.buildPackages.haskell.packages.ghc8107; + ghc = self.buildPackages.haskell.compiler.ghc8107; + }; + }; }; } diff --git a/nixpkgs/github.json b/nixpkgs/github.json index c79282fdf..3a5419336 100644 --- a/nixpkgs/github.json +++ b/nixpkgs/github.json @@ -1,8 +1,8 @@ { "owner": "obsidiansystems", "repo": "nixpkgs", - "branch": "dg/reflex-platform-21.05", + "branch": "reflex-platform-unstable", "private": false, - "rev": "466d823b4deafd1159c5e8fb05a257a7792d31e0", - "sha256": "1r83w8z1n0x445py7qf9db7ak8q1wm90ap7il66ag1vv5k8adgpl" + "rev": "22cf53eb29f52af963398de744c422d6fe15a3d4", + "sha256": "1hz0jhf40byn5v44sznx27msy5mx3a8i25pbqyh5dd42rripdd8z" } diff --git a/packages.nix b/packages.nix index f2e19ae0e..8461e5db3 100644 --- a/packages.nix +++ b/packages.nix @@ -20,5 +20,6 @@ with haskellPackages; # Add ghc-only packages here # ############################################################################## reflex-todomvc + hlint ] else []) ++ builtins.concatLists (map (x: (x.override { mkDerivation = drv: { out = (drv.buildDepends or []) ++ (drv.libraryHaskellDepends or []) ++ (drv.executableHaskellDepends or []); }; }).out) [ reflex reflex-dom reflex-todomvc ]) diff --git a/project/default.nix b/project/default.nix index 0d3f24d64..26568a801 100644 --- a/project/default.nix +++ b/project/default.nix @@ -113,7 +113,7 @@ in # # tools = ghc: with ghc; [ hpack pkgs.chromium ]; -, withHoogle ? true +, withHoogle ? false # Set to false to disable building the hoogle database when entering # the nix-shell. @@ -169,7 +169,7 @@ let shells = mapAttrs (name: pnames: workOnMulti { envFunc = _: prj.${name}.override { overrides = self: super: nixpkgs.lib.optionalAttrs withHoogle { - ghcWithPackages = self.ghcWithHoogle; + ghcWithPackages = (super.ghcWithPackages.override { withHoogle = true; }); }; }; packageNames = pnames; inherit tools shellToolOverrides; diff --git a/release.nix b/release.nix index 670ae7172..04fe3b666 100644 --- a/release.nix +++ b/release.nix @@ -7,6 +7,7 @@ "x86_64-linux" # "i686-linux" "x86_64-darwin" + "aarch64-darwin" ] }: @@ -51,7 +52,7 @@ let dep = {} // (lib.optionalAttrs reflex-platform.androidSupport reflex-platform.ghcAndroidAarch64._dep) - // reflex-platform.ghcjs8_6._dep + // (lib.optionalAttrs reflex-platform.ghc86Support reflex-platform.ghcjs8_6._dep) // benchmark.dep ; @@ -75,12 +76,13 @@ let # TODO uncomment this once GHCJS profiling builds are fixed # tryReflexShell = reflex-platform.tryReflexShell; ghc.ReflexTodomvc = reflex-platform.ghc.reflex-todomvc; - ghc8_6.reflexTodomvc = reflex-platform.ghc8_6.reflex-todomvc; ghc8_10.reflexTodomvc = reflex-platform.ghc8_10.reflex-todomvc; ghc.reflex-vty = reflex-platform.ghc.reflex-vty; ghc.reflex-process = reflex-platform.ghc.reflex-process; ghc.reflex-fsnotify = reflex-platform.ghc.reflex-fsnotify; skeleton-test-ghc = skeleton-test.ghc; + } // lib.optionalAttrs (reflex-platform.ghc86Support) { + ghc8_6.reflexTodomvc = reflex-platform.ghc8_6.reflex-todomvc; } // lib.optionalAttrs (reflex-platform.androidSupport) { inherit (reflex-platform) androidReflexTodomvc; inherit (reflex-platform) androidReflexTodomvc-8_6; @@ -113,15 +115,17 @@ let tryReflexShell = reflex-platform.tryReflexShell; ghcjs.reflexTodomvc = jsexeHydra reflex-platform.ghcjs.reflex-todomvc; # TODO Doesn't currently build. Removing from CI until fixed. - ghcjs8_6.reflexTodomvc = jsexeHydra reflex-platform.ghcjs8_6.reflex-todomvc; ghcjs8_10.reflexTodomvc = jsexeHydra reflex-platform.ghcjs8_10.reflex-todomvc; # TODO move back to `perOptDebugVariant` skeleton-test-ghcjs = skeleton-test.ghcjs; - nojsstring = { + nojsstring = ({ ghcjs.reflexTodomvc = reflex-platform-nojsstring.ghcjs.reflex-todomvc; - ghcjs8_6.reflexTodomvc = reflex-platform-nojsstring.ghcjs8_6.reflex-todomvc; ghcjs8_10.reflexTodomvc = reflex-platform-nojsstring.ghcjs8_10.reflex-todomvc; - }; + } // lib.optionalAttrs reflex-platform.ghc86Support { + ghcjs8_6.reflexTodomvc = reflex-platform-nojsstring.ghcjs8_6.reflex-todomvc; + }); + } // lib.optionalAttrs reflex-platform.ghc86Support { + ghcjs8_6.reflexTodomvc = jsexeHydra reflex-platform.ghcjs8_6.reflex-todomvc; } // lib.optionalAttrs (system == "x86_64-linux") { inherit #benchmark diff --git a/tests/skeleton.nix b/tests/skeleton.nix index 54b4f81b4..efde6f121 100644 --- a/tests/skeleton.nix +++ b/tests/skeleton.nix @@ -9,8 +9,7 @@ let name = "reflex-project-skeleton-${projectFile}"; phases = [ "unpackPhase" "buildPhase" "installPhase" ]; src = skeletonSrc; - CABAL_CONFIG = builtins.toFile "cabal.config" '' - ''; + CABAL_CONFIG = builtins.toFile "cabal.config" ''''; buildPhase = '' HOME=$NIX_BUILD_TOP cabal new-build all --project-file=${projectFile} ${if reflex-platform.nixpkgs.stdenv.isDarwin then "--ghc-option=-dynamic" else ""}